Commit 1d9ededc authored by Ghislain MARY's avatar Ghislain MARY

Fix compilation with clang.

parent 1433a1b1
......@@ -228,7 +228,7 @@ MS2_PUBLIC char * ms_stun_calculate_integrity_long_term_from_ha1(const char *buf
MS2_PUBLIC uint32_t ms_stun_calculate_fingerprint(const char *buf, size_t bufsize);
MS2_PUBLIC MSStunMessage * ms_stun_message_create(uint16_t type, uint16_t method);
MS2_PUBLIC MSStunMessage * ms_stun_message_create_from_buffer_parsing(const uint8_t *buf, size_t bufsize);
MS2_PUBLIC MSStunMessage * ms_stun_message_create_from_buffer_parsing(const uint8_t *buf, ssize_t bufsize);
MS2_PUBLIC MSStunMessage * ms_stun_binding_request_create(void);
MS2_PUBLIC MSStunMessage * ms_stun_binding_success_response_create(void);
MS2_PUBLIC MSStunMessage * ms_stun_binding_error_response_create(void);
......
......@@ -2535,7 +2535,7 @@ void ice_handle_stun_packet(IceCheckList *cl, RtpSession *rtp_session, const Ort
if (cl->session == NULL) return;
msg = ms_stun_message_create_from_buffer_parsing(mp->b_rptr, (int)(mp->b_wptr - mp->b_rptr));
msg = ms_stun_message_create_from_buffer_parsing(mp->b_rptr, (ssize_t)(mp->b_wptr - mp->b_rptr));
if (msg == NULL) {
ms_warning("ice: Received invalid STUN packet");
return;
......
......@@ -60,8 +60,8 @@ typedef struct {
char *buffer;
char *ptr;
char *lenptr;
size_t cursize;
size_t remaining;
ssize_t cursize;
ssize_t remaining;
} StunMessageEncoder;
......@@ -310,13 +310,13 @@ static void encode_data(StunMessageEncoder *encoder, uint8_t *data, uint16_t dat
typedef struct {
const uint8_t *buffer;
const uint8_t *ptr;
size_t size;
size_t remaining;
ssize_t size;
ssize_t remaining;
bool_t error;
} StunMessageDecoder;
static void stun_message_decoder_init(StunMessageDecoder *decoder, const uint8_t *buf, size_t bufsize) {
static void stun_message_decoder_init(StunMessageDecoder *decoder, const uint8_t *buf, ssize_t bufsize) {
decoder->buffer = decoder->ptr = buf;
decoder->size = decoder->remaining = bufsize;
decoder->error = FALSE;
......@@ -699,7 +699,7 @@ MSStunMessage * ms_stun_message_create(uint16_t type, uint16_t method) {
return msg;
}
MSStunMessage * ms_stun_message_create_from_buffer_parsing(const uint8_t *buf, size_t bufsize) {
MSStunMessage * ms_stun_message_create_from_buffer_parsing(const uint8_t *buf, ssize_t bufsize) {
StunMessageDecoder decoder;
MSStunMessage *msg = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment