<div dir="ltr">following up here<div>i found if we comment out a single line of code, kamcmd ul.flush works</div><div><br></div><div>here is the git diff</div><div><br></div><div><br></div><div><br></div><div><div>diff --git a/src/modules/usrloc/ucontact.c b/src/modules/usrloc/ucontact.c</div><div>index 47f3c2f..633ca81 100644</div><div>--- a/src/modules/usrloc/ucontact.c</div><div>+++ b/src/modules/usrloc/ucontact.c</div><div>@@ -474,7 +474,7 @@ int db_insert_ucontact(ucontact_t* _c)</div><div>        int nr_cols;</div><div>        </div><div>        if (_c->flags & FL_MEM) {</div><div>-               return 0;</div><div>+               //return 0;</div><div>        }</div><div>        if(unlikely(_c->ruid.len<=0)) {</div><div>                LM_ERR("invalid ruid for aor: %.*s\n",</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>I don't quite understand the logic in that code.</div><div>Does anyone have an idea of why `        if (_c->flags & FL_MEM) {`   returns?</div><div><br></div><div>Thanks,</div><div>/V</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 12, 2017 at 4:34 PM, Vik Killa <span dir="ltr"><<a href="mailto:vipkilla@gmail.com" target="_blank">vipkilla@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div>we've noticed that the usrloc module does not "sync" all the records from memory into the database.</div><div>I use a bash script to generate in-memory AoRs (<a href="http://paste.debian.net/plain/908521" target="_blank">http://paste.debian.net/<wbr>plain/908521</a>)</div><div>then i perform</div><div>kamcmd ul.flush </div><div>and no records are inserted.</div><div>We have tried various usrloc parameters but none seem to work</div><div>Here is our basic setup</div><div><br></div><div><div># ----- usrloc params -----</div><div>modparam("usrloc", "db_url", DBURL)</div><div>modparam("usrloc", "db_mode", 2)</div><div>modparam("usrloc", "use_domain", 1)</div><div>modparam("usrloc", "timer_interval", 120)</div><div>modparam("usrloc", "timer_procs", 4)</div><div><br></div></div><div>We are using postgresql.</div><div>are we missing something?<br><br></div><div>Thanks</div><span class="HOEnZb"><font color="#888888"><div>/V</div></font></span></div>
</blockquote></div><br></div>