summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadalyan Vyacheslav <v.badalyan@open-bs.ru>2016-12-08 18:54:06 +0000
committerRichard Mudgett <rmudgett@digium.com>2016-12-08 13:17:40 -0600
commit51118e7d70fff89b229fe9937108129911ff2f78 (patch)
treea2b07a20007391cfc8142b224ce461352ec499b6
parent5a96e1fb5e0158bf29accff11aea8afea8b40f48 (diff)
chan_sip: Delete unneeded check
P is always true. We check it before Change-Id: Iee61cda002a9f61aee26b9f66c5f9b59e3389efb
-rw-r--r--channels/chan_sip.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 7f22b96c8..1566b54bd 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6885,10 +6885,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;
}