diff --git a/modules_k/uac/uac.c b/modules_k/uac/uac.c index 763dd5a..d1bb3fe 100644 --- a/modules_k/uac/uac.c +++ b/modules_k/uac/uac.c @@ -359,13 +359,15 @@ static int child_init(int rank) return -1; uac_reg_load_db(); - uac_reg_timer(0); + LM_ERR("----------------------- uac_reg_timer(0,1) \n"); + uac_reg_timer(0,1); for(;;){ /* update the local config framework structures */ cfg_update(); sleep(reg_timer_interval); - uac_reg_timer(get_ticks()); + LM_ERR("----------------------- uac_reg_timer(get_ticks(),0) \n"); + uac_reg_timer(get_ticks(),0); } } /* parent */ diff --git a/modules_k/uac/uac_reg.c b/modules_k/uac/uac_reg.c index d944a10..618f700 100644 --- a/modules_k/uac/uac_reg.c +++ b/modules_k/uac/uac_reg.c @@ -710,8 +710,9 @@ int uac_reg_update(reg_uac_t *reg, time_t tn) /** * */ -void uac_reg_timer(unsigned int ticks) +void uac_reg_timer(unsigned int ticks, unsigned int initial_reg_call) { + LM_ERR("----------------------- uac_reg_timer() -- enter \n"); int i; reg_item_t *it = NULL; time_t tn; @@ -723,6 +724,13 @@ void uac_reg_timer(unsigned int ticks) it = _reg_htable->entries[i].byuuid; while(it) { + LM_ERR("----------------------- uac_reg_timer() -- 1 \n"); + + if (initial_reg_call == 1) + { + LM_ERR("----------------------- uac_reg_timer() -- 2 \n"); + sleep(1000); + } uac_reg_update(it->r, tn); it = it->next; } @@ -1038,7 +1046,8 @@ static void rpc_uac_reg_dump(rpc_t* rpc, void* ctx) tn = time(NULL); for(i=0; i<_reg_htable->htsize; i++) - { + {; + /* free entries */ reg = _reg_htable->entries[i].byuuid; while(reg) diff --git a/modules_k/uac/uac_reg.h b/modules_k/uac/uac_reg.h index b863cdc..8caff3d 100644 --- a/modules_k/uac/uac_reg.h +++ b/modules_k/uac/uac_reg.h @@ -48,7 +48,8 @@ int uac_reg_load_db(void); int uac_reg_init_ht(unsigned int sz); int uac_reg_free_ht(void); -void uac_reg_timer(unsigned int ticks); +void uac_reg_timer(unsigned int ticks, unsigned int initial_reg_call); + int uac_reg_init_rpc(void); int uac_reg_lookup(struct sip_msg *msg, str *src, pv_spec_t *dst, int mode);