mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-10 06:29:34 +00:00
sofia-sip: fix gcc 4.3 build (FSBUILD-105)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11518 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
09fc2d5f4d
commit
fd0a6589e0
@ -1 +1 @@
|
||||
Thur Jan 20 17:23:18 CST 2009
|
||||
Tue Jan 27 15:54:10 MST 2009
|
||||
|
@ -211,17 +211,18 @@ issize_t sl_allow_print(FILE *stream,
|
||||
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++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user