Module: kamailio
Branch: master
Commit: 4d24e42e127d4157e040512cac81a9548623748b
URL:
https://github.com/kamailio/kamailio/commit/4d24e42e127d4157e040512cac81a95…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-05-06T23:49:37+02:00
uac: relocate setting flag for outgoing registration
- avoid letting it set in case of low shared memory
- removed redundate reset of the same flag
---
Modified: modules/uac/uac_reg.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4d24e42e127d4157e040512cac81a95…
Patch:
https://github.com/kamailio/kamailio/commit/4d24e42e127d4157e040512cac81a95…
---
diff --git a/modules/uac/uac_reg.c b/modules/uac/uac_reg.c
index 5bf24eb..c56afef 100644
--- a/modules/uac/uac_reg.c
+++ b/modules/uac/uac_reg.c
@@ -898,7 +898,6 @@ void uac_reg_tm_callback( struct cell *t, int type, struct tmcb_params
*ps)
}
error:
- ri->flags &= ~(UAC_REG_ONGOING|UAC_REG_AUTHSENT);
if(reg_retry_interval) {
ri->timer_expires = time(NULL) + reg_retry_interval;
} else {
@@ -935,16 +934,16 @@ int uac_reg_update(reg_uac_t *reg, time_t tn)
return 4;
if(reg->timer_expires > tn + reg_timer_interval + 3)
return 3;
- reg->timer_expires = tn;
- reg->flags |= UAC_REG_ONGOING;
- reg->flags &= ~UAC_REG_ONLINE;
- counter_add(regactive, -1); /* Take it out of the active pool while re-registering */
uuid = (char*)shm_malloc(reg->l_uuid.len+1);
if(uuid==NULL)
{
LM_ERR("no more shm\n");
return -1;
}
+ reg->timer_expires = tn;
+ reg->flags |= UAC_REG_ONGOING;
+ reg->flags &= ~UAC_REG_ONLINE;
+ counter_add(regactive, -1); /* Take it out of the active pool while re-registering */
memcpy(uuid, reg->l_uuid.s, reg->l_uuid.len);
uuid[reg->l_uuid.len] = '\0';