Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/soap.c @ 22798:05cb3f04c01e
This cleans up a bunch of warnings that stem from the fact that size_t and
gsize have different sizes on different platforms.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sat, 03 May 2008 02:12:26 +0000 |
parents | 03c950701fac |
children | 5cdd93dac7a2 d756a0477c06 |
comparison
equal
deleted
inserted
replaced
22796:5e6b42e77fb7 | 22798:05cb3f04c01e |
---|---|
271 case 0: | 271 case 0: |
272 case EBADF: /* we are sometimes getting this in Windows */ | 272 case EBADF: /* we are sometimes getting this in Windows */ |
273 case EAGAIN: return len; | 273 case EAGAIN: return len; |
274 | 274 |
275 default : purple_debug_error("MSN SOAP", "Read error!" | 275 default : purple_debug_error("MSN SOAP", "Read error!" |
276 "read len: %d, error = %s\n", | 276 "read len: %" G_GSSIZE_FORMAT ", error = %s\n", |
277 len, g_strerror(errno)); | 277 len, g_strerror(errno)); |
278 purple_input_remove(soapconn->input_handler); | 278 purple_input_remove(soapconn->input_handler); |
279 //soapconn->input_handler = 0; | 279 //soapconn->input_handler = 0; |
280 g_free(soapconn->read_buf); | 280 g_free(soapconn->read_buf); |
281 soapconn->read_buf = NULL; | 281 soapconn->read_buf = NULL; |
291 memcpy(soapconn->read_buf + soapconn->read_len, temp_buf, len); | 291 memcpy(soapconn->read_buf + soapconn->read_len, temp_buf, len); |
292 soapconn->read_len += len; | 292 soapconn->read_len += len; |
293 soapconn->read_buf[soapconn->read_len] = '\0'; | 293 soapconn->read_buf[soapconn->read_len] = '\0'; |
294 } | 294 } |
295 else { | 295 else { |
296 purple_debug_error("MSN SOAP", "Failure re-allocating %d bytes of memory!\n", soapconn->read_len + len + 1); | 296 purple_debug_error("MSN SOAP", |
297 "Failure re-allocating %" G_GSIZE_FORMAT " bytes of memory!\n", | |
298 soapconn->read_len + len + 1); | |
297 exit(EXIT_FAILURE); | 299 exit(EXIT_FAILURE); |
298 } | 300 } |
299 | 301 |
300 } | 302 } |
301 | 303 |
302 #if defined(MSN_SOAP_DEBUG) | 304 #if defined(MSN_SOAP_DEBUG) |
303 if (len > 0) | 305 if (len > 0) |
304 purple_debug_info("MSN SOAP","Read %d bytes from SOAP server:\n%s\n", len, soapconn->read_buf + soapconn->read_len - len); | 306 purple_debug_info("MSN SOAP", |
307 "Read %" G_GSIZE_FORMAT " bytes from SOAP server:\n%s\n", len, | |
308 soapconn->read_buf + soapconn->read_len - len); | |
305 #endif | 309 #endif |
306 | 310 |
307 return len; | 311 return len; |
308 } | 312 } |
309 | 313 |
521 /*setup the conn body */ | 525 /*setup the conn body */ |
522 soapconn->body = body_start; | 526 soapconn->body = body_start; |
523 soapconn->body_len = atoi(body_len); | 527 soapconn->body_len = atoi(body_len); |
524 g_free(body_len); | 528 g_free(body_len); |
525 #ifdef MSN_SOAP_DEBUG | 529 #ifdef MSN_SOAP_DEBUG |
526 purple_debug_misc("MSN SOAP","SOAP bytes read so far: %d, Content-Length: %d\n", soapconn->read_len, soapconn->body_len); | 530 purple_debug_misc("MSN SOAP", |
531 "SOAP bytes read so far: %" G_GSIZE_FORMAT ", Content-Length: %d\n", | |
532 soapconn->read_len, soapconn->body_len); | |
527 #endif | 533 #endif |
528 soapconn->need_to_read = (body_start - soapconn->read_buf + soapconn->body_len) - soapconn->read_len; | 534 soapconn->need_to_read = (body_start - soapconn->read_buf + soapconn->body_len) - soapconn->read_len; |
529 if ( soapconn->need_to_read > 0 ) { | 535 if ( soapconn->need_to_read > 0 ) { |
530 return; | 536 return; |
531 } | 537 } |