Fix portability (Bug #3842)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
730194d609
commit
4e156d3435
1 changed files with 5 additions and 5 deletions
|
@ -2573,7 +2573,7 @@ static struct sip_pvt *find_call(struct sip_request *req, struct sockaddr_in *si
|
||||||
strncpy(tmp, get_header(req, "To"), sizeof(tmp) - 1);
|
strncpy(tmp, get_header(req, "To"), sizeof(tmp) - 1);
|
||||||
else
|
else
|
||||||
strncpy(tmp, get_header(req, "From"), sizeof(tmp) - 1);
|
strncpy(tmp, get_header(req, "From"), sizeof(tmp) - 1);
|
||||||
tag = strcasestr(tmp, "tag=");
|
tag = ast_strcasestr(tmp, "tag=");
|
||||||
if (tag) {
|
if (tag) {
|
||||||
tag += 4;
|
tag += 4;
|
||||||
c = strchr(tag, ';');
|
c = strchr(tag, ';');
|
||||||
|
@ -3335,7 +3335,7 @@ static int respprep(struct sip_request *resp, struct sip_pvt *p, char *msg, stru
|
||||||
copy_all_header(resp, req, "Record-Route");
|
copy_all_header(resp, req, "Record-Route");
|
||||||
copy_header(resp, req, "From");
|
copy_header(resp, req, "From");
|
||||||
ot = get_header(req, "To");
|
ot = get_header(req, "To");
|
||||||
if (!strcasestr(ot, "tag=") && strncmp(msg, "100", 3)) {
|
if (!ast_strcasestr(ot, "tag=") && strncmp(msg, "100", 3)) {
|
||||||
/* Add the proper tag if we don't have it already. If they have specified
|
/* Add the proper tag if we don't have it already. If they have specified
|
||||||
their tag, use it. Otherwise, use our own tag */
|
their tag, use it. Otherwise, use our own tag */
|
||||||
if (!ast_strlen_zero(p->theirtag) && ast_test_flag(p, SIP_OUTGOING))
|
if (!ast_strlen_zero(p->theirtag) && ast_test_flag(p, SIP_OUTGOING))
|
||||||
|
@ -3444,7 +3444,7 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in
|
||||||
|
|
||||||
/* Add tag *unless* this is a CANCEL, in which case we need to send it exactly
|
/* Add tag *unless* this is a CANCEL, in which case we need to send it exactly
|
||||||
as our original request, including tag (or presumably lack thereof) */
|
as our original request, including tag (or presumably lack thereof) */
|
||||||
if (!strcasestr(ot, "tag=") && sipmethod != SIP_CANCEL) {
|
if (!ast_strcasestr(ot, "tag=") && sipmethod != SIP_CANCEL) {
|
||||||
/* Add the proper tag if we don't have it already. If they have specified
|
/* Add the proper tag if we don't have it already. If they have specified
|
||||||
their tag, use it. Otherwise, use our own tag */
|
their tag, use it. Otherwise, use our own tag */
|
||||||
if (ast_test_flag(p, SIP_OUTGOING) && !ast_strlen_zero(p->theirtag))
|
if (ast_test_flag(p, SIP_OUTGOING) && !ast_strlen_zero(p->theirtag))
|
||||||
|
@ -7699,7 +7699,7 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
|
||||||
|
|
||||||
/* Get their tag if we haven't already */
|
/* Get their tag if we haven't already */
|
||||||
to = get_header(req, "To");
|
to = get_header(req, "To");
|
||||||
to = strcasestr(to, "tag=");
|
to = ast_strcasestr(to, "tag=");
|
||||||
if (to) {
|
if (to) {
|
||||||
to += 4;
|
to += 4;
|
||||||
strncpy(p->theirtag, to, sizeof(p->theirtag) - 1);
|
strncpy(p->theirtag, to, sizeof(p->theirtag) - 1);
|
||||||
|
@ -8869,7 +8869,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
|
||||||
/* Find their tag if we haven't got it */
|
/* Find their tag if we haven't got it */
|
||||||
if (ast_strlen_zero(p->theirtag)) {
|
if (ast_strlen_zero(p->theirtag)) {
|
||||||
from = get_header(req, "From");
|
from = get_header(req, "From");
|
||||||
from = strcasestr(from, "tag=");
|
from = ast_strcasestr(from, "tag=");
|
||||||
if (from) {
|
if (from) {
|
||||||
from += 4;
|
from += 4;
|
||||||
strncpy(p->theirtag, from, sizeof(p->theirtag) - 1);
|
strncpy(p->theirtag, from, sizeof(p->theirtag) - 1);
|
||||||
|
|
Loading…
Reference in a new issue