提交 24c198c0 authored 作者: Michael Jerris's avatar Michael Jerris

fix merge conflict

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12389 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 fe74d315
...@@ -211,25 +211,17 @@ issize_t sl_allow_print(FILE *stream, ...@@ -211,25 +211,17 @@ issize_t sl_allow_print(FILE *stream,
issize_t sl_payload_print(FILE *stream, char const *prefix, sip_payload_t const *pl) 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; char *s = pl->pl_data, *end = pl->pl_data + pl->pl_len;
size_t n, total = 0, crlf = 1, actual; size_t n, total = 0, crlf = 1;
while (s < end && *s != '\0') { while (s < end && *s != '\0') {
n = su_strncspn(s, end - s, "\r\n"); n = su_strncspn(s, end - s, "\r\n");
crlf = su_strnspn(s + n, end - s - n, "\r\n"); crlf = su_strnspn(s + n, end - s - n, "\r\n");
if (prefix) if (prefix)
fputs(prefix, stream), total += strlen(prefix); fputs(prefix, stream), total += strlen(prefix);
v v v v v v v
actual = fwrite(s, 1, n + crlf, stream) ;
if (actual == 0)
return -1;
s += actual;
total += actual;
*************
if (fwrite(s, 1, n + crlf, stream) < n + crlf) if (fwrite(s, 1, n + crlf, stream) < n + crlf)
return (issize_t)-1; return (issize_t)-1;
s += n + crlf; s += n + crlf;
total += n + crlf; total += n + crlf;
^ ^ ^ ^ ^ ^ ^
} }
if (crlf == 0) if (crlf == 0)
fputs("\n", stream), total++; fputs("\n", stream), total++;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论