summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2011-08-10 22:24:38 +0000
committerKinsey Moore <kmoore@digium.com>2011-08-10 22:24:38 +0000
commita6ea606a784ab6376c20faf9f1b0dd31c3bdf6e0 (patch)
tree8cab4e86549a7e8acc7a953bae0d0dc6b71efab9 /channels/chan_sip.c
parent9d785ca5f30ae96a1a31e922e1cbb3a351a9a9c7 (diff)
Merged revisions 331518 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r331518 | kmoore | 2011-08-10 17:23:49 -0500 (Wed, 10 Aug 2011) | 17 lines Merged revisions 331517 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r331517 | kmoore | 2011-08-10 17:23:08 -0500 (Wed, 10 Aug 2011) | 10 lines SIP Notify via AMI or CLI leaks SIP PVTs Any SIP notify sent via AMI or CLI leaks a SIP PVT with ref count +2. Removing the additional ref just before the invite and adding an unref following it corrects the issue as seen via REF_DEBUG. The unref existed in a distant revision and it appears as though the wrong ref operation was removed. (closes issue ASTERISK-18091) Review: https://reviewboard.asterisk.org/r/1332/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 0223f1377..ed828a57c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12744,9 +12744,9 @@ static int manager_sipnotify(struct mansession *s, const struct message *m)
}
}
- dialog_ref(p, "bump the count of p, which transmit_sip_request will decrement.");
sip_scheddestroy(p, SIP_TRANS_TIMEOUT);
transmit_invite(p, SIP_NOTIFY, 0, 2, NULL);
+ dialog_unref(p, "bump down the count of p since we're done with it.");
astman_send_ack(s, m, "Notify Sent");
ast_variables_destroy(vars);
@@ -18966,9 +18966,9 @@ static char *sip_cli_notify(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
/* Recalculate our side, and recalculate Call ID */
ast_cli(a->fd, "Sending NOTIFY of type '%s' to '%s'\n", a->argv[2], a->argv[i]);
- dialog_ref(p, "bump the count of p, which transmit_sip_request will decrement.");
sip_scheddestroy(p, SIP_TRANS_TIMEOUT);
transmit_invite(p, SIP_NOTIFY, 0, 2, NULL);
+ dialog_unref(p, "bump down the count of p since we're done with it.");
}
return CLI_SUCCESS;