diff --git a/netwerk/sctp/datachannel/DataChannel.cpp b/netwerk/sctp/datachannel/DataChannel.cpp index 285ee502379..d4099ecfec2 100644 --- a/netwerk/sctp/datachannel/DataChannel.cpp +++ b/netwerk/sctp/datachannel/DataChannel.cpp @@ -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))) { diff --git a/netwerk/sctp/datachannel/DataChannelProtocol.h b/netwerk/sctp/datachannel/DataChannelProtocol.h index 41aaea5a48a..6ad9c649499 100644 --- a/netwerk/sctp/datachannel/DataChannelProtocol.h +++ b/netwerk/sctp/datachannel/DataChannelProtocol.h @@ -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...