diff options
author | Badalyan Vyacheslav <v.badalyan@open-bs.ru> | 2016-12-08 18:54:06 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2016-12-08 16:55:41 -0600 |
commit | ec7d86c90f126e57301c90ee5bd26002e4063c16 (patch) | |
tree | 49611fd5f66dafff7833122175c92432f320300e /channels/chan_sip.c | |
parent | 3aa4d891bbf89bbd273cec490e43df246d81854b (diff) |
chan_sip: Delete unneeded check
P is always true. We check it before
Change-Id: Iee61cda002a9f61aee26b9f66c5f9b59e3389efb
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2f86bdf17..8fa98d2c9 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6892,10 +6892,9 @@ static int update_call_counter(struct sip_pvt *fup, int event) ast_log(LOG_ERROR, "update_call_counter(%s, %d) called with no event!\n", name, event); } - if (p) { - ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "SIP/%s", p->name); - sip_unref_peer(p, "update_call_counter: sip_unref_peer from call counter"); - } + ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "SIP/%s", p->name); + sip_unref_peer(p, "update_call_counter: sip_unref_peer from call counter"); + return 0; } |