Bug 858691: Cleanup of DataChannel OpenRequest Message r=jesup

This commit is contained in:
Michael Tüxen 2013-04-09 00:55:16 -04:00
parent 3f747b8308
commit 2c0e4b3e3d
2 changed files with 3 additions and 3 deletions

View File

@ -932,7 +932,7 @@ DataChannelConnection::SendOpenRequestMessage(const nsACString& label,
req->channel_type |= 0x80; // NOTE: be careful if new types are added in the future
}
req->reliability_params = htons((uint16_t)prValue); /* XXX Why 16-bit */
req->reliability_param = htonl(prValue);
req->priority = htons(0); /* XXX: add support */
req->label_length = htons(label_len);
req->protocol_length = htons(proto_len);
@ -1092,7 +1092,7 @@ DataChannelConnection::HandleOpenRequestMessage(const struct rtcweb_datachannel_
/* XXX error handling */
return;
}
prValue = ntohs(req->reliability_params);
prValue = ntohl(req->reliability_param);
flags = (req->channel_type & 0x80) ? DATA_CHANNEL_FLAGS_OUT_OF_ORDER_ALLOWED : 0;
if ((channel = FindChannelByStream(stream))) {

View File

@ -42,8 +42,8 @@
struct rtcweb_datachannel_open_request {
uint8_t msg_type; // DATA_CHANNEL_OPEN
uint8_t channel_type;
uint16_t reliability_params;
int16_t priority;
uint32_t reliability_param;
uint16_t label_length;
uint16_t protocol_length;
char label[1]; // (and protocol) keep VC++ happy...