aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-15 19:00:52 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-15 19:00:52 +0000
commit2b206fc7b388a3f2c7c24d7d78bccd4eda039d67 (patch)
tree243c201c194d9df350df29bdf5fa4cd031c0aa78
parentf9940310711b5aeaea42af66d9663864a35fbd6f (diff)
Merged revisions 168725 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r168725 | mmichelson | 2009-01-15 13:00:06 -0600 (Thu, 15 Jan 2009) | 17 lines Remove an unneeded condition for line addition to a SIP request/response In Asterisk 1.4 and 1.6.0, the sip_request structure had a statically allocated buffer to hold the text of the request. There was a check in the add_line function to not attempt to write the line into the buffer if we did not have room for it. In trunk and Asterisk versions starting with 1.6.1, an expandable ast_str structure is used to hold the text. Since it may grow to fit an arbitrarily sized string, this check in add_line is no longer valid. I found this oddity while attempting to fix issue #14220; however, I do not believe that this is the fix for that issue since the output supplied by the reporter did not contain the warning message that would be printed had this condition been satisfied. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@168726 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 206f978eb..6f0c309a4 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7594,10 +7594,6 @@ static int add_line(struct sip_request *req, const char *line)
if (!req->lines)
/* Add extra empty return */
req->len += ast_str_append(&req->data, 0, "\r\n");
- if (req->len >= sizeof(req->data->str) - 4) {
- ast_log(LOG_WARNING, "Out of space, can't add anymore\n");
- return -1;
- }
req->line[req->lines] = req->data->str + req->len;
ast_str_append(&req->data, 0, "%s", line);
req->len += strlen(req->line[req->lines]);