Remove some code that is basically a no-op. Code above this already ensures that
the buffer is terminated. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155513 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
ca8422df50
commit
0c16e82b36
|
@ -20136,12 +20136,6 @@ static int sipsock_read(int *id, int fd, short events, void *ignore)
|
|||
if (!(req.data = ast_str_create(SIP_MIN_PACKET)))
|
||||
return 1;
|
||||
ast_str_set(&req.data, 0, "%s", readbuf);
|
||||
if (res == sizeof(req.data) - 1) {
|
||||
ast_debug(1, "Received packet exceeds buffer. Data is possibly lost\n");
|
||||
req.data->str[sizeof(req.data) - 1] = '\0';
|
||||
} else
|
||||
req.data->str[res] = '\0';
|
||||
req.len = res;
|
||||
|
||||
req.socket.fd = sipsock;
|
||||
req.socket.type = SIP_TRANSPORT_UDP;
|
||||
|
|
Reference in New Issue