diff options
author | Mark Michelson <mmichelson@digium.com> | 2012-03-27 18:44:53 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2012-03-27 18:44:53 +0000 |
commit | 01cc64585e8a6cd10690086ae80aad32d9af5cb9 (patch) | |
tree | 89c54d24d902b5255860f21a70e6334b754ad99d /channels | |
parent | 38e892b370c81382dab117ef0a3a1bd2104e9520 (diff) |
Make a debug message regarding subscription changes more accurate.
I was getting confused during some testing why Asterisk was saying that
a subscription was being added when it was clearly being removed. This
fixes that confusion.
........
Merged revisions 360625 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 360672 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f60540357..df36ce0e9 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -25886,12 +25886,15 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, } if (sipdebug) { + const char *action = p->expiry > 0 ? "Adding" : "Removing"; if (p->subscribed == MWI_NOTIFICATION && p->relatedpeer) { - ast_debug(2, "Adding subscription for mailbox notification - peer %s\n", p->relatedpeer->name); + ast_debug(2, "%s subscription for mailbox notification - peer %s\n", + action, p->relatedpeer->name); } else if (p->subscribed == CALL_COMPLETION) { - ast_debug(2, "Adding CC subscription for peer %s\n", p->username); + ast_debug(2, "%s CC subscription for peer %s\n", action, p->username); } else { - ast_debug(2, "Adding subscription for extension %s context %s for peer %s\n", p->exten, p->context, p->username); + ast_debug(2, "%s subscription for extension %s context %s for peer %s\n", + action, p->exten, p->context, p->username); } } if (p->autokillid > -1 && sip_cancel_destroy(p)) /* Remove subscription expiry for renewals */ |