Hi All,
Can anyone see a problem with doing (something like) the following, to
handle the situation like
http://lists.sip-router.org/pipermail/sr-users/2014-October/085251.html?
Admittedly, it is probably a less common use case, but it has been raised
several times on the list so I believe it is a genuine one.
diff --git a/modules/registrar/lookup.c b/modules/registrar/lookup.c
index 794d968..66730b4 100644
--- a/modules/registrar/lookup.c
+++ b/modules/registrar/lookup.c
@@ -41,6 +41,7 @@
#include "../../action.h"
#include "../../mod_fix.h"
#include "../../parser/parse_rr.h"
+#include "../../forward.h"
#include "../usrloc/usrloc.h"
#include "common.h"
#include "regtime.h"
@@ -121,6 +122,7 @@ int lookup_helper(struct sip_msg* _m, udomain_t* _d,
str* _uri, int _mode)
sr_xavp_t *list=NULL;
str xname = {"ruid", 4};
sr_xval_t xval;
+ sip_uri_t path_uri;
ret = -1;
@@ -265,6 +267,14 @@ int lookup_helper(struct sip_msg* _m, udomain_t* _d,
str* _uri, int _mode)
ret = -3;
goto done;
}
+ if (parse_uri(path_dst.s, path_dst.len, &path_uri)
< 0){
+ LM_ERR("failed to parse the Path URI\n");
+ ret = -3;
+ goto done;
+ }
+ }
+ /* Only use path-uri if non-local */
+ if (path_uri.host.s && !check_self(&(path_uri.host), 0, 0))
{
if (set_path_vector(_m, &ptr->path) < 0) {
LM_ERR("failed to set path vector\n");
ret = -3;
The above needs to be repeated in lookup_branches function of same file,
but I wanted to check others' opinions first.
Best regards,
Charles
--
www.sipcentric.com
Follow us on twitter @sipcentric <http://twitter.com/sipcentric>
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
Birmingham Science Park, Birmingham B7 4BB.
Module: kamailio
Branch: master
Commit: 95a7d14716bdcc7c8fd27bcf8f2449e719a02eac
URL: https://github.com/kamailio/kamailio/commit/95a7d14716bdcc7c8fd27bcf8f2449e…
Author: Charles Chance <charles.chance(a)sipcentric.com>
Committer: Charles Chance <charles.chance(a)sipcentric.com>
Date: 2015-01-09T17:06:14Z
htable: update documentation to reiterate importance of loading DMQ module first if enable_dmq is set
- previously only mentioned in module dependency section
---
Modified: modules/htable/doc/htable_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/95a7d14716bdcc7c8fd27bcf8f2449e…
Patch: https://github.com/kamailio/kamailio/commit/95a7d14716bdcc7c8fd27bcf8f2449e…
---
diff --git a/modules/htable/doc/htable_admin.xml b/modules/htable/doc/htable_admin.xml
index 2e78d0c..9007813 100644
--- a/modules/htable/doc/htable_admin.xml
+++ b/modules/htable/doc/htable_admin.xml
@@ -633,6 +633,11 @@ modparam("htable", "db_expires", 1)
table definition (size, autoexpire etc.) is identical across all instances.
</para>
<para>
+ <emphasis>
+ Important: If this parameter is enabled, the DMQ module must be loaded first - otherwise, startup will fail.
+ </emphasis>
+ </para>
+ <para>
Currently, values are not replicated on load from DB as it is expected
that in these cases, all servers will load their values from the same DB.
</para>
Hello,
I am investigating a crash which is happening since:
commit 0c11f4f9c235bf791ac39446c293483462a99354
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Dec 29 22:26:46 2014 +0100
pua_dialoginfo: load dialogs for dialoginfo event upon restart
- based on a patch by Kristian Høgh, FS#360
The problem appears to be that in this function of pua_dialoginfo.c...
static void
__dialog_created(struct dlg_cell *dlg, int type, struct dlg_cb_params
*_params)
{
struct sip_msg *request = _params->req;
struct dlginfo_cell *dlginfo;
if (request->REQ_METHOD != METHOD_INVITE)
return;
if(send_publish_flag > -1 && !(request->flags &
(1<<send_publish_flag)))
return;
LM_DBG("new INVITE dialog created: from=%.*s\n", dlg->from_uri.len,
dlg->from_uri.s);
dlginfo=get_dialog_data(dlg, type);
if(dlginfo==NULL)
return;
dialog_publish_multi("Trying", dlginfo->pubruris_caller,
&(dlg->from_uri),
(include_req_uri)?&(dlg->req_uri):&(dlg->to_uri),
&(dlg->callid), 1, dlginfo->lifetime,
0, 0, 0, 0, (send_publish_flag==-1)?1:0);
free_dlginfo_cell(dlginfo);
}
...dlginfo is freed, but is still being referenced in the callback
registered here...
struct dlginfo_cell* get_dialog_data(struct dlg_cell *dlg, int type)
{
...
/* register dialog callbacks which triggers sending PUBLISH */
if (dlg_api.register_dlgcb(dlg,
DLGCB_FAILED| DLGCB_CONFIRMED_NA |
DLGCB_TERMINATED
| DLGCB_EXPIRED | DLGCB_REQ_WITHIN |
DLGCB_EARLY,
__dialog_sendpublish, dlginfo,
free_dlginfo_cell) != 0) {
LM_ERR("cannot register callback for interesting dialog
types\n");
free_dlginfo_cell(dlginfo);
return NULL;
}
...
return(dlginfo);
}
Can the freeing of this structure simply be left up to the dialog module
when the dialog is eventually destroyed?
All the best,
Charles
--
www.sipcentric.com
Follow us on twitter @sipcentric <http://twitter.com/sipcentric>
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
Birmingham Science Park, Birmingham B7 4BB.