]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5915 --resolve
authorBrian West <brian@freeswitch.org>
Fri, 28 Feb 2014 22:09:59 +0000 (16:09 -0600)
committerBrian West <brian@freeswitch.org>
Fri, 28 Feb 2014 22:09:59 +0000 (16:09 -0600)
src/mod/endpoints/mod_sofia/sofia_reg.c

index df2037f8d5843701dad8551ba5d4141e1b94e8f1..159f7c752076c34757cafa8bb8adc4de1b6f8b4d 100644 (file)
@@ -2870,7 +2870,8 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile,
                }
        }
 
-       if (max_registrations_perext > 0 && (sip && sip->sip_contact && (sip->sip_contact->m_expires == NULL || atol(sip->sip_contact->m_expires) > 0))) {
+       /* The max-registrations-per-extension-option only affects REGISTER-authentications */
+       if ((REG_REGISTER == regtype || REG_AUTO_REGISTER == regtype) && max_registrations_perext > 0 && (sip && sip->sip_contact && (sip->sip_contact->m_expires == NULL || atol(sip->sip_contact->m_expires) > 0))) {
                /* if expires is null still process */
                /* expires == 0 means the phone is going to unregiser, so don't count against max */
                uint32_t count = 0;