mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
Fix selection of tag in reqprep
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1949,9 +1949,9 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, char *msg, int in
|
|||||||
if (!strstr(ot, "tag=") && strcasecmp(msg, "CANCEL")) {
|
if (!strstr(ot, "tag=") && strcasecmp(msg, "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 (!p->outgoing && strlen(p->theirtag))
|
if (p->outgoing && strlen(p->theirtag))
|
||||||
snprintf(newto, sizeof(newto), "%s;tag=%s", ot, p->theirtag);
|
snprintf(newto, sizeof(newto), "%s;tag=%s", ot, p->theirtag);
|
||||||
else if (p->outgoing)
|
else if (!p->outgoing)
|
||||||
snprintf(newto, sizeof(newto), "%s;tag=%08x", ot, p->tag);
|
snprintf(newto, sizeof(newto), "%s;tag=%08x", ot, p->tag);
|
||||||
else
|
else
|
||||||
snprintf(newto, sizeof(newto), "%s", ot);
|
snprintf(newto, sizeof(newto), "%s", ot);
|
||||||
|
Reference in New Issue
Block a user