[Freeswitch-svn] [commit] r11518 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nta

FreeSWITCH SVN mikej at freeswitch.org
Tue Jan 27 14:59:00 PST 2009


Author: mikej
Date: Tue Jan 27 16:59:00 2009
New Revision: 11518

Log:
sofia-sip: fix gcc 4.3 build (FSBUILD-105)

Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils_print.c

Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Tue Jan 27 16:59:00 2009
@@ -1 +1 @@
-Thur Jan 20 17:23:18 CST 2009
+Tue Jan 27 15:54:10 MST 2009

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils_print.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils_print.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils_print.c	Tue Jan 27 16:59:00 2009
@@ -211,17 +211,18 @@
 issize_t sl_payload_print(FILE *stream, char const *prefix, sip_payload_t const *pl)
 {
   char *s = pl->pl_data, *end = pl->pl_data + pl->pl_len;
-  size_t n, total = 0, crlf = 1;
+  size_t n, total = 0, crlf = 1, actual;
 
   while (s < end && *s != '\0') {
     n = strncspn(s, end - s, "\r\n");
     crlf = strnspn(s + n, end - s - n, "\r\n");
     if (prefix)
       fputs(prefix, stream), total += strlen(prefix);
-	if (fwrite(s, 1, n + crlf, stream) < 0)
-		return -1;
-    s += n + crlf;
-    total += n + crlf;
+    actual = fwrite(s, 1, n + crlf, stream) ;
+    if (actual == 0)
+       return -1;
+    s += actual;
+    total += actual;
   }
   if (crlf == 0)
     fputs("\n", stream), total++;



More information about the Freeswitch-svn mailing list