[sr-dev] git:master:5b9c5b7d: uac: update flags for disabled state when refreshing record from db

Daniel-Constantin Mierla miconda at gmail.com
Mon Jan 18 10:04:19 CET 2016


Module: kamailio
Branch: master
Commit: 5b9c5b7dfac1aa7eb98e7986fd3345e3f411783a
URL: https://github.com/kamailio/kamailio/commit/5b9c5b7dfac1aa7eb98e7986fd3345e3f411783a

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-01-18T09:15:37+01:00

uac: update flags for disabled state when refreshing record from db

---

Modified: modules/uac/uac_reg.c

---

Diff:  https://github.com/kamailio/kamailio/commit/5b9c5b7dfac1aa7eb98e7986fd3345e3f411783a.diff
Patch: https://github.com/kamailio/kamailio/commit/5b9c5b7dfac1aa7eb98e7986fd3345e3f411783a.patch

---

diff --git a/modules/uac/uac_reg.c b/modules/uac/uac_reg.c
index cadc473..509d2ef 100644
--- a/modules/uac/uac_reg.c
+++ b/modules/uac/uac_reg.c
@@ -532,6 +532,8 @@ int reg_ht_add(reg_uac_t *reg)
 	}
 	memset(nr, 0, sizeof(reg_uac_t) + len);
 	nr->expires = reg->expires;
+	nr->flags   = reg->flags;
+	nr->reg_delay = reg->reg_delay;
 	nr->h_uuid = reg_compute_hash(&reg->l_uuid);
 	nr->h_user = reg_compute_hash(&reg->l_username);
 	
@@ -595,6 +597,7 @@ int reg_ht_update_attrs(reg_uac_t *reg)
 			strncpy(ri->r->auth_proxy.s, reg->auth_proxy.s, reg->auth_proxy.len);
 			ri->r->auth_proxy.len = reg->auth_proxy.len;
 			ri->r->auth_proxy.s[reg->auth_proxy.len] = '\0';
+			if(reg->flags & UAC_REG_DISABLED) ri->r->flags |= UAC_REG_DISABLED;
 			lock_release(&_reg_htable->entries[slot].lock);
 			return 0;
 		}




More information about the sr-dev mailing list