Module: kamailio
Branch: master
Commit: a4b43f962a4493defb3fd608d1d2fad3ee58794a
URL: https://github.com/kamailio/kamailio/commit/a4b43f962a4493defb3fd608d1d2fad…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-09-15T15:26:39+02:00
core: proper code block when saving chosen naptr record
---
Modified: resolve.c
---
Diff: https://github.com/kamailio/kamailio/commit/a4b43f962a4493defb3fd608d1d2fad…
Patch: https://github.com/kamailio/kamailio/commit/a4b43f962a4493defb3fd608d1d2fad…
---
diff --git a/resolve.c b/resolve.c
index 0af1be3..3d57418 100644
--- a/resolve.c
+++ b/resolve.c
@@ -1335,7 +1335,7 @@ struct hostent* srv_sip_resolvehost(str* name, int zt, unsigned short* port,
-#ifdef USE_NAPTR
+#ifdef USE_NAPTR
/** iterates over a naptr rr list, returning each time a "good" naptr record
@@ -1343,7 +1343,7 @@ struct hostent* srv_sip_resolvehost(str* name, int zt, unsigned short* port,
* params:
* naptr_head - naptr rr list head
* tried - bitmap used to keep track of the already tried records
- * (no more then sizeof(tried)*8 valid records are
+ * (no more then sizeof(tried)*8 valid records are
* ever walked
* srv_name - if succesfull, it will be set to the selected record
* srv name (naptr repl.)
@@ -1351,10 +1351,10 @@ struct hostent* srv_sip_resolvehost(str* name, int zt, unsigned short* port,
* protocol
* returns 0 if no more records found or a pointer to the selected record
* and sets protocol and srv_name
- * WARNING: when calling first time make sure you run first
+ * WARNING: when calling first time make sure you run first
* naptr_iterate_init(&tried)
*/
-struct rdata* naptr_sip_iterate(struct rdata* naptr_head,
+struct rdata* naptr_sip_iterate(struct rdata* naptr_head,
naptr_bmp_t* tried,
str* srv_name, char* proto)
{
@@ -1373,7 +1373,7 @@ struct rdata* naptr_sip_iterate(struct rdata* naptr_head,
saved_proto=0;
i=0;
for(l=naptr_head; l && (i<MAX_NAPTR_RRS); l=l->next){
- if (l->type!=T_NAPTR) continue;
+ if (l->type!=T_NAPTR) continue;
naptr=(struct naptr_rdata*) l->rdata;
if (naptr==0){
LM_CRIT("null rdata\n");
@@ -1391,17 +1391,18 @@ struct rdata* naptr_sip_iterate(struct rdata* naptr_head,
#endif
if ((naptr_proto_supported(naptr_proto))){
if (naptr_choose(&naptr_saved, &saved_proto,
- naptr, naptr_proto))
+ naptr, naptr_proto)) {
idx=i;
l_saved=l;
}
+ }
i++;
}
if (naptr_saved){
/* found something */
#ifdef NAPTR_DBG
LM_DBG("choosed NAPTR rr %.*s, proto %d tried: 0x%x\n",
- naptr_saved->repl_len,
+ naptr_saved->repl_len,
naptr_saved->repl, (int)saved_proto, *tried);
#endif
*tried|=1<<idx;
Hello,
fyi: I renamed the API structure exported by the ims_dialog module
because it was using same name as the dialog module, but they were no
longer compatible, given the changes since ims_dialog was forked from
dialog module. That exposed the risk of modules compiled to use the
dialog api module to mistakenly load ims_module api at runtime and
access pointers in the structure which were no longer at the same
position and with the same meaning.
I think I updated all the other modules depending on ims_module api, if
you discover some troubles, reportem them.
In short: the old 'struct dlg_binds' is replaced by type 'ims_dlg_api_t'
(or 'struct ims_dlg_bind') and load_dlg_api() function was replaced by
load_ims_dlg_api().
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.orghttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda