[asterisk-commits] oej: trunk r47202 - /trunk/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Nov 4 12:20:30 MST 2006
Author: oej
Date: Sat Nov 4 13:20:30 2006
New Revision: 47202
URL: http://svn.digium.com/view/asterisk?rev=47202&view=rev
Log:
Simplify previous patch
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=47202&r1=47201&r2=47202&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Sat Nov 4 13:20:30 2006
@@ -3043,23 +3043,11 @@
ast_copy_string(name, fup->username, sizeof(name));
/* Check the list of users only for incoming calls */
- if (!outgoing) {
- if (global_limitonpeers == FALSE && (u = find_user(name, 1))) {
+ if (global_limitonpeers == FALSE && !outgoing && (u = find_user(name, 1))) {
inuse = &u->inUse;
call_limit = &u->call_limit;
inringing = NULL;
- } else {
- /* If limitonpeers is on, we only apply the limits to the
- peer part of the type=friend. This is mainly to
- help the queue system */
- p = find_peer(name, NULL, 1); /* Check the peer */
- if (p != NULL) {
- inuse = &p->inUse;
- call_limit = &p->call_limit;
- inringing = &p->inRinging;
- }
- }
- } else if ( (p = find_peer(fup->peername, NULL, 1) ) ) { /* Try to find peer */
+ } else if ( (p = find_peer(ast_strlen_zero(fup->peername) ? name : fup->peername, NULL, 1) ) ) { /* Try to find peer */
inuse = &p->inUse;
call_limit = &p->call_limit;
inringing = &p->inRinging;
More information about the asterisk-commits
mailing list