|
|
|
|
@ -1,8 +1,6 @@
|
|
|
|
|
diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c
|
|
|
|
|
index ab1c66a..069bb04 100644
|
|
|
|
|
--- a/modules/nathelper/nathelper.c
|
|
|
|
|
+++ b/modules/nathelper/nathelper.c
|
|
|
|
|
@@ -340,6 +340,7 @@ static char *force_socket_str = 0;
|
|
|
|
|
@@ -340,6 +340,7 @@
|
|
|
|
|
static pid_t mypid;
|
|
|
|
|
static int sipping_flag = -1;
|
|
|
|
|
static int natping_processes = 1;
|
|
|
|
|
@ -10,7 +8,7 @@ index ab1c66a..069bb04 100644
|
|
|
|
|
|
|
|
|
|
static str nortpproxy_str = str_init("a=nortpproxy:yes");
|
|
|
|
|
|
|
|
|
|
@@ -415,6 +416,7 @@ static param_export_t params[] = {
|
|
|
|
|
@@ -415,6 +416,7 @@
|
|
|
|
|
{"natping_processes", INT_PARAM, &natping_processes },
|
|
|
|
|
{"natping_socket", STR_PARAM, &natping_socket },
|
|
|
|
|
{"keepalive_timeout", INT_PARAM, &nh_keepalive_timeout },
|
|
|
|
|
@ -18,7 +16,7 @@ index ab1c66a..069bb04 100644
|
|
|
|
|
|
|
|
|
|
{0, 0, 0}
|
|
|
|
|
};
|
|
|
|
|
@@ -1946,9 +1948,10 @@ nh_timer(unsigned int ticks, void *timer_idx)
|
|
|
|
|
@@ -1948,9 +1950,10 @@
|
|
|
|
|
goto done;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -31,7 +29,7 @@ index ab1c66a..069bb04 100644
|
|
|
|
|
if (rval<0) {
|
|
|
|
|
LM_ERR("failed to fetch contacts\n");
|
|
|
|
|
goto done;
|
|
|
|
|
@@ -1962,9 +1965,10 @@ nh_timer(unsigned int ticks, void *timer_idx)
|
|
|
|
|
@@ -1964,9 +1967,10 @@
|
|
|
|
|
LM_ERR("out of pkg memory\n");
|
|
|
|
|
goto done;
|
|
|
|
|
}
|
|
|
|
|
@ -44,11 +42,9 @@ index ab1c66a..069bb04 100644
|
|
|
|
|
if (rval != 0) {
|
|
|
|
|
pkg_free(buf);
|
|
|
|
|
goto done;
|
|
|
|
|
diff --git a/modules/usrloc/dlist.c b/modules/usrloc/dlist.c
|
|
|
|
|
index 2f14f16..999fdc1 100644
|
|
|
|
|
--- a/modules/usrloc/dlist.c
|
|
|
|
|
+++ b/modules/usrloc/dlist.c
|
|
|
|
|
@@ -88,10 +88,12 @@ static inline int find_dlist(str* _n, dlist_t** _d)
|
|
|
|
|
@@ -88,10 +88,12 @@
|
|
|
|
|
* \param flags contact flags
|
|
|
|
|
* \param part_idx part index
|
|
|
|
|
* \param part_max maximal part
|
|
|
|
|
@ -62,7 +58,7 @@ index 2f14f16..999fdc1 100644
|
|
|
|
|
{
|
|
|
|
|
static char query_buf[512];
|
|
|
|
|
static str query_str;
|
|
|
|
|
@@ -172,7 +174,7 @@ static inline int get_all_db_ucontacts(void *buf, int len, unsigned int flags,
|
|
|
|
|
@@ -172,7 +174,7 @@
|
|
|
|
|
|
|
|
|
|
/* received */
|
|
|
|
|
addr.s = (char*)VAL_STRING(ROW_VALUES(row));
|
|
|
|
|
@ -71,7 +67,7 @@ index 2f14f16..999fdc1 100644
|
|
|
|
|
/* contact */
|
|
|
|
|
addr.s = (char*)VAL_STRING(ROW_VALUES(row)+1);
|
|
|
|
|
if (VAL_NULL(ROW_VALUES(row)+1) || addr.s==0 || addr.s[0]==0) {
|
|
|
|
|
@@ -293,10 +295,12 @@ static inline int get_all_db_ucontacts(void *buf, int len, unsigned int flags,
|
|
|
|
|
@@ -293,10 +295,12 @@
|
|
|
|
|
* \param flags contact flags
|
|
|
|
|
* \param part_idx part index
|
|
|
|
|
* \param part_max maximal part
|
|
|
|
|
@ -85,7 +81,7 @@ index 2f14f16..999fdc1 100644
|
|
|
|
|
{
|
|
|
|
|
dlist_t *p;
|
|
|
|
|
urecord_t *r;
|
|
|
|
|
@@ -355,7 +359,7 @@ static inline int get_all_mem_ucontacts(void *buf, int len, unsigned int flags,
|
|
|
|
|
@@ -355,7 +359,7 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -94,7 +90,7 @@ index 2f14f16..999fdc1 100644
|
|
|
|
|
needed = (int)(sizeof(c->received.len)
|
|
|
|
|
+ c->received.len
|
|
|
|
|
+ sizeof(c->sock) + sizeof(c->cflags)
|
|
|
|
|
@@ -466,15 +470,33 @@ static inline int get_all_mem_ucontacts(void *buf, int len, unsigned int flags,
|
|
|
|
|
@@ -466,15 +470,33 @@
|
|
|
|
|
* \param flags contact flags
|
|
|
|
|
* \param part_idx part index
|
|
|
|
|
* \param part_max maximal part
|
|
|
|
|
@ -130,11 +126,9 @@ index 2f14f16..999fdc1 100644
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/modules/usrloc/dlist.h b/modules/usrloc/dlist.h
|
|
|
|
|
index 149b84c..e39f09a 100644
|
|
|
|
|
--- a/modules/usrloc/dlist.h
|
|
|
|
|
+++ b/modules/usrloc/dlist.h
|
|
|
|
|
@@ -121,6 +121,20 @@ int synchronize_all_udomains(int istart, int istep);
|
|
|
|
|
@@ -121,6 +121,20 @@
|
|
|
|
|
int get_all_ucontacts(void *buf, int len, unsigned int flags,
|
|
|
|
|
unsigned int part_idx, unsigned int part_max);
|
|
|
|
|
|
|
|
|
|
@ -155,11 +149,9 @@ index 149b84c..e39f09a 100644
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Find and return usrloc domain
|
|
|
|
|
diff --git a/modules/usrloc/usrloc.c b/modules/usrloc/usrloc.c
|
|
|
|
|
index ba0ec1a..716aca5 100644
|
|
|
|
|
--- a/modules/usrloc/usrloc.c
|
|
|
|
|
+++ b/modules/usrloc/usrloc.c
|
|
|
|
|
@@ -62,6 +62,7 @@ int bind_usrloc(usrloc_api_t* api)
|
|
|
|
|
@@ -62,6 +62,7 @@
|
|
|
|
|
api->register_udomain = register_udomain;
|
|
|
|
|
api->get_udomain = get_udomain;
|
|
|
|
|
api->get_all_ucontacts = get_all_ucontacts;
|
|
|
|
|
@ -167,8 +159,6 @@ index ba0ec1a..716aca5 100644
|
|
|
|
|
api->insert_urecord = insert_urecord;
|
|
|
|
|
api->delete_urecord = delete_urecord;
|
|
|
|
|
api->get_urecord = get_urecord;
|
|
|
|
|
diff --git a/modules/usrloc/usrloc.h b/modules/usrloc/usrloc.h
|
|
|
|
|
index 8b96d90..8da7b02 100644
|
|
|
|
|
--- a/modules/usrloc/usrloc.h
|
|
|
|
|
+++ b/modules/usrloc/usrloc.h
|
|
|
|
|
@@ -41,6 +41,8 @@
|
|
|
|
|
@ -180,7 +170,7 @@ index 8b96d90..8da7b02 100644
|
|
|
|
|
/*forward declaration necessary for udomain*/
|
|
|
|
|
|
|
|
|
|
struct udomain;
|
|
|
|
|
@@ -175,6 +177,9 @@ typedef int (*register_udomain_t)(const char* _n, struct udomain** _d);
|
|
|
|
|
@@ -175,6 +177,9 @@
|
|
|
|
|
typedef int (*get_all_ucontacts_t) (void* buf, int len, unsigned int flags,
|
|
|
|
|
unsigned int part_idx, unsigned int part_max);
|
|
|
|
|
|
|
|
|
|
@ -190,7 +180,7 @@ index 8b96d90..8da7b02 100644
|
|
|
|
|
typedef int (*get_udomain_t)(const char* _n, udomain_t** _d);
|
|
|
|
|
|
|
|
|
|
typedef unsigned int (*ul_get_aorhash_t)(str *_aor);
|
|
|
|
|
@@ -195,6 +200,7 @@ typedef struct usrloc_api {
|
|
|
|
|
@@ -195,6 +200,7 @@
|
|
|
|
|
register_udomain_t register_udomain;
|
|
|
|
|
get_udomain_t get_udomain;
|
|
|
|
|
get_all_ucontacts_t get_all_ucontacts;
|
|
|
|
|
|