diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-22 16:00:19 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-22 16:00:19 +0000 |
commit | 8ed9bfff202132a17d5d723ed1e8e1ad5483111f (patch) | |
tree | a403ce57bcd1ac0dc30af40035b43fe61846ebb9 | |
parent | 06621c972ed3635ee8224efc19a618e1e66a21c6 (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@8435 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 3abcc25f7..b51360433 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -564,6 +564,8 @@ struct sip_auth { #define SIP_CALL_LIMIT (1 << 29) /* Remote Party-ID Support */ #define SIP_SENDRPID (1 << 30) +/* Did this connection increment the counter of in-use calls? */ +#define SIP_INC_COUNT (1 << 31) #define SIP_FLAGS_TO_COPY \ (SIP_PROMISCREDIR | SIP_TRUSTRPID | SIP_SENDRPID | SIP_DTMF | SIP_REINVITE | \ @@ -2256,7 +2258,8 @@ static int update_call_counter(struct sip_pvt *fup, int event) /* incoming and outgoing affects the inUse counter */ case DEC_CALL_LIMIT: if ( *inuse > 0 ) { - (*inuse)--; + if (ast_test_flag(fup,SIP_INC_COUNT)) + (*inuse)--; } else { *inuse = 0; } @@ -2276,6 +2279,7 @@ static int update_call_counter(struct sip_pvt *fup, int event) } } (*inuse)++; + ast_set_flag(fup,SIP_INC_COUNT); if (option_debug > 1 || sipdebug) { ast_log(LOG_DEBUG, "Call %s %s '%s' is %d out of %d\n", outgoing ? "to" : "from", u ? "user":"peer", name, *inuse, *call_limit); } |