Turn 4 lines of code into 1 line that does the same thing.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77538 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
f54aa54210
commit
9f83c7c5d3
1 changed files with 1 additions and 4 deletions
|
@ -8974,10 +8974,7 @@ static void sip_peer_hold(struct sip_pvt *p, int hold)
|
|||
return;
|
||||
|
||||
/* If they put someone on hold, increment the value... otherwise decrement it */
|
||||
if (hold)
|
||||
ast_atomic_fetchadd_int(&peer->onHold, +1);
|
||||
else
|
||||
ast_atomic_fetchadd_int(&peer->onHold, -1);
|
||||
ast_atomic_fetchadd_int(&peer->onHold, (hold ? +1 : -1));
|
||||
|
||||
/* Request device state update */
|
||||
ast_device_state_changed("SIP/%s", peer->name);
|
||||
|
|
Reference in a new issue