[sr-dev] git:master: registrar(k): maintaining one contact per AoR has priority over max_contacts

Daniel-Constantin Mierla miconda at gmail.com
Mon Dec 19 13:21:58 CET 2011


Module: sip-router
Branch: master
Commit: 8f5183a3416cadad7d4afac36721b8f972e310b1
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8f5183a3416cadad7d4afac36721b8f972e310b1

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Mon Dec 19 13:18:54 2011 +0100

registrar(k): maintaining one contact per AoR has priority over max_contacts

- when using save() with the flags to keep only one contact per AoR,
  max_contacts limit is no longer applied, as it is not matching the
  demants of save() when max_contacts=1
- partch by Walter Doekes, closes FS#192

---

 modules_k/registrar/save.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules_k/registrar/save.c b/modules_k/registrar/save.c
index caa5465..8ff9ce7 100644
--- a/modules_k/registrar/save.c
+++ b/modules_k/registrar/save.c
@@ -563,7 +563,7 @@ static inline int update_contacts(struct sip_msg* _m, urecord_t* _r,
 		goto error;
 	}
 
-	if (cfg_get(registrar, registrar_cfg, max_contacts)) {
+	if (!_mode && cfg_get(registrar, registrar_cfg, max_contacts)) {
 		_c = get_first_contact(_m);
 		if(test_max_contacts(_m, _r, _c, ci) != 0)
 			goto error;




More information about the sr-dev mailing list