remove redundant strlen
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4357 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
f8352e76ae
commit
a644b549c5
|
@ -554,14 +554,13 @@ static void *SWITCH_THREAD_FUNC api_exec(switch_thread_t *thread, void *obj)
|
||||||
switch_event_fire(&event);
|
switch_event_fire(&event);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch_size_t len;
|
switch_size_t rlen, blen;
|
||||||
char buf[1024];
|
char buf[1024] = "";
|
||||||
len = strlen(reply);
|
rlen = strlen(reply);
|
||||||
snprintf(buf, sizeof(buf), "Content-Type: api/response\nContent-Length: %"APR_SSIZE_T_FMT"\n\n", len);
|
snprintf(buf, sizeof(buf), "Content-Type: api/response\nContent-Length: %"APR_SSIZE_T_FMT"\n\n", rlen);
|
||||||
len = strlen(buf);
|
blen = strlen(buf);
|
||||||
switch_socket_send(acs->listener->sock, buf, &len);
|
switch_socket_send(acs->listener->sock, buf, &blen);
|
||||||
len = strlen(reply);
|
switch_socket_send(acs->listener->sock, reply, &rlen);
|
||||||
switch_socket_send(acs->listener->sock, reply, &len);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_safe_free(stream.data);
|
switch_safe_free(stream.data);
|
||||||
|
|
Loading…
Reference in New Issue