diff options
author | Luigi Rizzo <rizzo@icir.org> | 2006-11-08 13:59:32 +0000 |
---|---|---|
committer | Luigi Rizzo <rizzo@icir.org> | 2006-11-08 13:59:32 +0000 |
commit | 5e610776328f1d51a25346d5b310f26f32a203a4 (patch) | |
tree | 095c0f9e0c81789236fdfee6deb4d6f20418fd58 /channels/chan_sip.c | |
parent | d5b101e9745d62762d73a456606e747fcf41f930 (diff) |
merge from team/rizzo/astobj2 rev.47271
avoid doing p > 0 when p is a pointer;
move a lock closer to the place where it is needed
Approved By: oej
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c45f1b149..b2a0e7bb3 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8535,12 +8535,12 @@ static struct sip_pvt *get_sip_pvt_byid_locked(const char *callid, const char *t { struct sip_pvt *sip_pvt_ptr; - dialoglist_lock(); if (option_debug > 3 && totag) ast_log(LOG_DEBUG, "Looking for callid %s (fromtag %s totag %s)\n", callid, fromtag ? fromtag : "<no fromtag>", totag ? totag : "<no totag>"); /* Search dialogs and find the match */ + dialoglist_lock(); for (sip_pvt_ptr = dialoglist; sip_pvt_ptr; sip_pvt_ptr = sip_pvt_ptr->next) { if (!strcmp(sip_pvt_ptr->callid, callid)) { int match = 1; @@ -15013,7 +15013,7 @@ static int sip_poke_peer(struct sip_peer *peer) peer->call = NULL; return 0; } - if (peer->call > 0) { + if (peer->call) { if (sipdebug) ast_log(LOG_NOTICE, "Still have a QUALIFY dialog active, deleting\n"); sip_destroy(peer->call); |