[sr-dev] git:master:b186dc66: core: enable reuse of tcp sockets

2017-03-16 Thread grumvalski
Module: kamailio
Branch: master
Commit: b186dc66b3c0fc7ba2cbbc88a1fd3112d4d7a492
URL: 
https://github.com/kamailio/kamailio/commit/b186dc66b3c0fc7ba2cbbc88a1fd3112d4d7a492

Author: grumvalski <federico.cabi...@gmail.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2017-03-16T16:36:04+01:00

core: enable reuse of tcp sockets

- credits to Marco Sinibaldi for the original implementation

---

Modified: src/Makefile.defs
Modified: src/core/cfg.lex
Modified: src/core/cfg.y
Modified: src/core/forward.h
Modified: src/core/tcp_main.c
Modified: src/core/tcp_options.c
Modified: src/core/tcp_options.h
Modified: src/modules/tm/uac.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/b186dc66b3c0fc7ba2cbbc88a1fd3112d4d7a492.diff
Patch: 
https://github.com/kamailio/kamailio/commit/b186dc66b3c0fc7ba2cbbc88a1fd3112d4d7a492.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.4:6c6f25b5: http_async_client: handle 100 Continue from server

2017-02-02 Thread grumvalski
Module: kamailio
Branch: 4.4
Commit: 6c6f25b581e083068e9b3832e8f0235a24a88021
URL: 
https://github.com/kamailio/kamailio/commit/6c6f25b581e083068e9b3832e8f0235a24a88021

Author: grumvalski <federico.cabi...@gmail.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2017-02-02T15:28:16+01:00

http_async_client: handle 100 Continue from server

(cherry-picked from commit de1c5397847a3660182832a040d9e9c2e737e654)

---

Modified: modules/http_async_client/async_http.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/6c6f25b581e083068e9b3832e8f0235a24a88021.diff
Patch: 
https://github.com/kamailio/kamailio/commit/6c6f25b581e083068e9b3832e8f0235a24a88021.patch

---

diff --git a/modules/http_async_client/async_http.c 
b/modules/http_async_client/async_http.c
index 24dc8ba..4b6c33c 100644
--- a/modules/http_async_client/async_http.c
+++ b/modules/http_async_client/async_http.c
@@ -45,7 +45,7 @@
 #include "../../dprint.h"
 #include "../../ut.h"
 #include "../../cfg/cfg_struct.h"
-#include "../../lib/kcore/faked_msg.h"
+#include "../../fmsg.h"
 #include "../../modules/tm/tm_load.h"
 
 #include "async_http.h"
@@ -122,6 +122,7 @@ void async_http_cb(struct http_m_reply *reply, void *param)
unsigned int tlabel;
struct cell *t = NULL;
char *p;
+   str newbuf = {0, 0};
sip_msg_t *fmsg;
 
if (reply->result != NULL) {
@@ -140,7 +141,6 @@ void async_http_cb(struct http_m_reply *reply, void *param)
ah_error.len = strlen(ah_error.s);
} else {
/* success */
-   
/* check for HTTP Via header
 * - HTTP Via format is different that SIP Via
 * - workaround: replace with Hia to be ignored by SIP parser
@@ -158,7 +158,28 @@ void async_http_cb(struct http_m_reply *reply, void *param)
if (parse_msg(reply->result->s, reply->result->len, ah_reply) 
!= 0) {
LM_DBG("failed to parse the http_reply\n");
} else {
-   LM_DBG("successfully parsed http reply %p\n", ah_reply);
+   if (ah_reply->first_line.u.reply.statuscode == 100) {
+   newbuf.s = get_body( ah_reply );
+   newbuf.len = reply->result->s + 
reply->result->len - newbuf.s;
+
+   if (!(newbuf.len < 0)) {
+   memset(ah_reply, 0, sizeof(struct 
sip_msg));
+   ah_reply->buf = newbuf.s;
+   ah_reply->len = newbuf.len;
+
+   if (parse_msg(ah_reply->buf, 
ah_reply->len, ah_reply) != 0) {
+   LM_DBG("failed to parse the 
http_reply\n");
+   } else {
+   LM_DBG("successfully parsed 
http reply %p\n", ah_reply);
+   }
+   } else {
+   /* this should not happen! */
+   LM_WARN("something got wrong parsing 
the 100 Continue: got %d len\n", newbuf.len);
+   }
+   
+   } else {
+   LM_DBG("successfully parsed http reply %p\n", 
ah_reply);
+   }
}
}
 


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:de1c5397: http_async_client: handle 100 Continue from server

2017-02-02 Thread grumvalski
Module: kamailio
Branch: master
Commit: de1c5397847a3660182832a040d9e9c2e737e654
URL: 
https://github.com/kamailio/kamailio/commit/de1c5397847a3660182832a040d9e9c2e737e654

Author: grumvalski <federico.cabi...@gmail.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2017-02-02T15:03:39+01:00

http_async_client: handle 100 Continue from server

---

Modified: src/modules/http_async_client/async_http.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/de1c5397847a3660182832a040d9e9c2e737e654.diff
Patch: 
https://github.com/kamailio/kamailio/commit/de1c5397847a3660182832a040d9e9c2e737e654.patch

---

diff --git a/src/modules/http_async_client/async_http.c 
b/src/modules/http_async_client/async_http.c
index 57d203a..5c1d249 100644
--- a/src/modules/http_async_client/async_http.c
+++ b/src/modules/http_async_client/async_http.c
@@ -124,6 +124,7 @@ void async_http_cb(struct http_m_reply *reply, void *param)
unsigned int tlabel;
struct cell *t = NULL;
char *p;
+   str newbuf = {0, 0};
sip_msg_t *fmsg;
 
if (reply->result != NULL) {
@@ -142,7 +143,6 @@ void async_http_cb(struct http_m_reply *reply, void *param)
ah_error.len = strlen(ah_error.s);
} else {
/* success */
-   
/* check for HTTP Via header
 * - HTTP Via format is different that SIP Via
 * - workaround: replace with Hia to be ignored by SIP parser
@@ -160,7 +160,28 @@ void async_http_cb(struct http_m_reply *reply, void *param)
if (parse_msg(reply->result->s, reply->result->len, ah_reply) 
!= 0) {
LM_DBG("failed to parse the http_reply\n");
} else {
-   LM_DBG("successfully parsed http reply %p\n", ah_reply);
+   if (ah_reply->first_line.u.reply.statuscode == 100) {
+   newbuf.s = get_body( ah_reply );
+   newbuf.len = reply->result->s + 
reply->result->len - newbuf.s;
+
+   if (!(newbuf.len < 0)) {
+   memset(ah_reply, 0, sizeof(struct 
sip_msg));
+   ah_reply->buf = newbuf.s;
+   ah_reply->len = newbuf.len;
+
+   if (parse_msg(ah_reply->buf, 
ah_reply->len, ah_reply) != 0) {
+   LM_DBG("failed to parse the 
http_reply\n");
+   } else {
+   LM_DBG("successfully parsed 
http reply %p\n", ah_reply);
+   }
+   } else {
+   /* this should not happen! */
+   LM_WARN("something got wrong parsing 
the 100 Continue: got %d len\n", newbuf.len);
+   }
+   
+   } else {
+   LM_DBG("successfully parsed http reply %p\n", 
ah_reply);
+   }
}
}
 


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:f81149d8: tm: reset T_ASYNC_CONTINUE flag in t_suspend

2017-01-30 Thread grumvalski
Module: kamailio
Branch: master
Commit: f81149d820246242db0e48f32948784b9db4ce82
URL: 
https://github.com/kamailio/kamailio/commit/f81149d820246242db0e48f32948784b9db4ce82

Author: grumvalski <federico.cabi...@gmail.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2017-01-29T09:10:23+01:00

tm: reset T_ASYNC_CONTINUE flag in t_suspend

---

Modified: src/modules/tm/t_suspend.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/f81149d820246242db0e48f32948784b9db4ce82.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f81149d820246242db0e48f32948784b9db4ce82.patch

---

diff --git a/src/modules/tm/t_suspend.c b/src/modules/tm/t_suspend.c
index a23429d..5703493 100644
--- a/src/modules/tm/t_suspend.c
+++ b/src/modules/tm/t_suspend.c
@@ -143,7 +143,8 @@ int t_suspend(struct sip_msg *msg,
*hash_index = t->hash_index;
*label = t->label;
 
-
+   /* reset the continue flag to be able to suspend in a failure route */
+   t->flags &= ~T_ASYNC_CONTINUE;
 
/* backup some extra info that can be used in continuation logic */
t->async_backup.backup_route = get_route_type();


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:0f18826d: http_async_client: removed functions to set the query's parameters

2016-12-29 Thread grumvalski
Module: kamailio
Branch: master
Commit: 0f18826dd10bc06210bdd3a05005dff476d4c8b7
URL: 
https://github.com/kamailio/kamailio/commit/0f18826dd10bc06210bdd3a05005dff476d4c8b7

Author: grumvalski <federico.cabi...@gmail.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2016-12-29T11:39:19+01:00

http_async_client: removed functions to set the query's parameters

---

Modified: src/modules/http_async_client/doc/http_async_client_admin.xml
Modified: src/modules/http_async_client/http_async_client_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/0f18826dd10bc06210bdd3a05005dff476d4c8b7.diff
Patch: 
https://github.com/kamailio/kamailio/commit/0f18826dd10bc06210bdd3a05005dff476d4c8b7.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.4:ad00a617: sipcapture: fix captid extraction from hep header for v3

2016-12-01 Thread grumvalski
Module: kamailio
Branch: 4.4
Commit: ad00a617dec57073a1e9facc64cf3a64904c6592
URL: 
https://github.com/kamailio/kamailio/commit/ad00a617dec57073a1e9facc64cf3a64904c6592

Author: Federico Cabiddu <fcabi...@libon.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2016-12-01T14:15:34+01:00

sipcapture: fix captid extraction from hep header for v3

(cherry picked from commit 969f4600193139d95b5f876378e0c92d4eab9a7a)

---

Modified: modules/sipcapture/hep.c
Modified: modules/sipcapture/hep.h
Modified: modules/sipcapture/sipcapture.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/ad00a617dec57073a1e9facc64cf3a64904c6592.diff
Patch: 
https://github.com/kamailio/kamailio/commit/ad00a617dec57073a1e9facc64cf3a64904c6592.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.4:6291792e: sipcapture: perform ntohs on src and dst port when payload is not SIP

2016-12-01 Thread grumvalski
Module: kamailio
Branch: 4.4
Commit: 6291792ecaee0bfb1855bf6ba4560e4d6af09f3e
URL: 
https://github.com/kamailio/kamailio/commit/6291792ecaee0bfb1855bf6ba4560e4d6af09f3e

Author: Federico Cabiddu <fcabi...@libon.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2016-12-01T14:04:45+01:00

sipcapture: perform ntohs on src and dst port when payload is not SIP

(cherry picked from commit 1fbca28c3a6e90ca478d152e116aca5e64780e9e)

---

Modified: modules/sipcapture/sipcapture.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/6291792ecaee0bfb1855bf6ba4560e4d6af09f3e.diff
Patch: 
https://github.com/kamailio/kamailio/commit/6291792ecaee0bfb1855bf6ba4560e4d6af09f3e.patch

---

diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
index 57f1c05..7b2f4b7 100644
--- a/modules/sipcapture/sipcapture.c
+++ b/modules/sipcapture/sipcapture.c
@@ -2285,11 +2285,11 @@ int receive_logging_json_msg(char * buf, unsigned int 
len, struct hep_generic_re
/*source ip*/
sco.source_ip.s = ipstr_src;
sco.source_ip.len = strlen(ipstr_src);
-   sco.source_port = hg->src_port->data;
+   sco.source_port = ntohs(hg->src_port->data);
 
sco.destination_ip.s = ipstr_dst;
sco.destination_ip.len = strlen(ipstr_dst);
-   sco.destination_port = hg->dst_port->data;
+   sco.destination_port = ntohs(hg->dst_port->data);
 
if(heptime && heptime->tv_sec != 0) {
sco.tmstamp = (unsigned long 
long)heptime->tv_sec*100+heptime->tv_usec; /* micro ts */


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:1fbca28c: sipcapture: perform ntohs on src and dst port when payload is not SIP

2016-12-01 Thread grumvalski
Module: kamailio
Branch: master
Commit: 1fbca28c3a6e90ca478d152e116aca5e64780e9e
URL: 
https://github.com/kamailio/kamailio/commit/1fbca28c3a6e90ca478d152e116aca5e64780e9e

Author: Federico Cabiddu <fcabi...@libon.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2016-11-30T18:23:46+01:00

sipcapture: perform ntohs on src and dst port when payload is not SIP

---

Modified: modules/sipcapture/sipcapture.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/1fbca28c3a6e90ca478d152e116aca5e64780e9e.diff
Patch: 
https://github.com/kamailio/kamailio/commit/1fbca28c3a6e90ca478d152e116aca5e64780e9e.patch

---

diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
index 19ffbe6..84bc6ed 100644
--- a/modules/sipcapture/sipcapture.c
+++ b/modules/sipcapture/sipcapture.c
@@ -2372,11 +2372,11 @@ int receive_logging_json_msg(char * buf, unsigned int 
len, struct hep_generic_re
/*source ip*/
sco.source_ip.s = ipstr_src;
sco.source_ip.len = strlen(ipstr_src);
-   sco.source_port = hg->src_port->data;
+   sco.source_port = ntohs(hg->src_port->data);
 
sco.destination_ip.s = ipstr_dst;
sco.destination_ip.len = strlen(ipstr_dst);
-   sco.destination_port = hg->dst_port->data;
+   sco.destination_port = ntohs(hg->dst_port->data);
 
if(heptime && heptime->tv_sec != 0) {
sco.tmstamp = (unsigned long 
long)heptime->tv_sec*100+heptime->tv_usec; /* micro ts */


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:969f4600: sipcapture: fix captid extraction from hep header for v3

2016-12-01 Thread grumvalski
Module: kamailio
Branch: master
Commit: 969f4600193139d95b5f876378e0c92d4eab9a7a
URL: 
https://github.com/kamailio/kamailio/commit/969f4600193139d95b5f876378e0c92d4eab9a7a

Author: Federico Cabiddu <fcabi...@libon.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2016-11-30T18:23:46+01:00

sipcapture: fix captid extraction from hep header for v3

---

Modified: modules/sipcapture/hep.c
Modified: modules/sipcapture/hep.h
Modified: modules/sipcapture/sipcapture.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/969f4600193139d95b5f876378e0c92d4eab9a7a.diff
Patch: 
https://github.com/kamailio/kamailio/commit/969f4600193139d95b5f876378e0c92d4eab9a7a.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:b1e8c2f0: http_async_client: added support for authentication

2016-11-30 Thread grumvalski
Module: kamailio
Branch: master
Commit: b1e8c2f007e533c7a01c3ced2a34620f4737ca18
URL: 
https://github.com/kamailio/kamailio/commit/b1e8c2f007e533c7a01c3ced2a34620f4737ca18

Author: Federico Cabiddu <fcabi...@libon.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2016-11-30T18:13:59+01:00

http_async_client: added support for authentication

---

Modified: modules/http_async_client/async_http.c
Modified: modules/http_async_client/async_http.h
Modified: modules/http_async_client/doc/http_async_client_admin.xml
Modified: modules/http_async_client/hm_hash.h
Modified: modules/http_async_client/http_async_client_mod.c
Modified: modules/http_async_client/http_multi.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/b1e8c2f007e533c7a01c3ced2a34620f4737ca18.diff
Patch: 
https://github.com/kamailio/kamailio/commit/b1e8c2f007e533c7a01c3ced2a34620f4737ca18.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:335e4463: tm: check branch uri against current uri when deciding if append a new branch

2016-07-08 Thread grumvalski
Module: kamailio
Branch: master
Commit: 335e44635aa69ab73ec76f713a7d5ce7ce06748c
URL: 
https://github.com/kamailio/kamailio/commit/335e44635aa69ab73ec76f713a7d5ce7ce06748c

Author: grumvalski <federico.cabi...@gmail.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2016-07-07T16:06:51+02:00

tm: check branch uri against current uri when deciding if append a new branch

---

Modified: modules/tm/t_append_branches.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/335e44635aa69ab73ec76f713a7d5ce7ce06748c.diff
Patch: 
https://github.com/kamailio/kamailio/commit/335e44635aa69ab73ec76f713a7d5ce7ce06748c.patch

---

diff --git a/modules/tm/t_append_branches.c b/modules/tm/t_append_branches.c
index f38a0a2..f745e75 100644
--- a/modules/tm/t_append_branches.c
+++ b/modules/tm/t_append_branches.c
@@ -127,7 +127,9 @@ int t_append_branches(void) {
found = 0;
for (i=0; i<outgoings; i++) {
if (t->uac[i].ruid.len == ruid.len
-   && !memcmp(t->uac[i].ruid.s, ruid.s, 
ruid.len)) {
+   && !memcmp(t->uac[i].ruid.s, ruid.s, 
ruid.len)
+   && t->uac[i].uri.len == current_uri.len 
+   && !memcmp(t->uac[i].uri.s, 
current_uri.s, current_uri.len)) {
LM_DBG("branch already added [%.*s]\n", 
ruid.len, ruid.s);
found = 1;
break;


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:d0bdaa75: cnxcc: release credit_data in terminate_all_calls

2016-06-06 Thread grumvalski
Module: kamailio
Branch: master
Commit: d0bdaa7567240b18794ab7512b09a55767c44240
URL: 
https://github.com/kamailio/kamailio/commit/d0bdaa7567240b18794ab7512b09a55767c44240

Author: grumvalski <federico.cabi...@gmail.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2016-06-05T08:27:37+02:00

cnxcc: release credit_data in terminate_all_calls

- GH #563

---

Modified: modules/cnxcc/cnxcc_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/d0bdaa7567240b18794ab7512b09a55767c44240.diff
Patch: 
https://github.com/kamailio/kamailio/commit/d0bdaa7567240b18794ab7512b09a55767c44240.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:a9ec529e: cnxcc: define inline functions in cnxcc.h

2015-12-22 Thread grumvalski
Module: kamailio
Branch: master
Commit: a9ec529ecee015e79dc60cb8ba8a6686cdf73a7b
URL: 
https://github.com/kamailio/kamailio/commit/a9ec529ecee015e79dc60cb8ba8a6686cdf73a7b

Author: grumvalski <federico.cabi...@gmail.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2015-12-22T13:48:19+01:00

cnxcc: define inline functions in cnxcc.h

---

Modified: modules/cnxcc/cnxcc.c
Modified: modules/cnxcc/cnxcc.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/a9ec529ecee015e79dc60cb8ba8a6686cdf73a7b.diff
Patch: 
https://github.com/kamailio/kamailio/commit/a9ec529ecee015e79dc60cb8ba8a6686cdf73a7b.patch

---

diff --git a/modules/cnxcc/cnxcc.c b/modules/cnxcc/cnxcc.c
index e869af4..3d21b3d 100644
--- a/modules/cnxcc/cnxcc.c
+++ b/modules/cnxcc/cnxcc.c
@@ -28,30 +28,6 @@
 
 #include "cnxcc.h"
 
-inline void get_datetime(str *dest)
-{
-   timestamp2isodt(dest, get_current_timestamp());
-}
-
-inline unsigned int get_current_timestamp()
-{
-   return time(NULL);
-}
-
-inline int timestamp2isodt(str *dest, unsigned int timestamp)
-{
-   time_t  tim;
-   struct tm   *tmPtr;
-
-   tim = timestamp;
-   tmPtr   = localtime();
-
-   strftime( dest->s, DATETIME_SIZE, "%Y-%m-%d %H:%M:%S", tmPtr);
-   dest->len   = DATETIME_LENGTH;
-
-   return 0;
-}
-
 double str2double(str *string)
 {
char buffer[string->len + 1];
diff --git a/modules/cnxcc/cnxcc.h b/modules/cnxcc/cnxcc.h
index 9454e16..3973eab 100644
--- a/modules/cnxcc/cnxcc.h
+++ b/modules/cnxcc/cnxcc.h
@@ -31,9 +31,30 @@
 #define DATETIME_LENGTHDATETIME_SIZE - 1
 
 
-inline void get_datetime(str *dest);
-inline unsigned int get_current_timestamp();
-inline int timestamp2isodt(str *dest, unsigned int timestamp);
+static inline unsigned int get_current_timestamp()
+{
+   return time(NULL);
+}
+
+static inline int timestamp2isodt(str *dest, unsigned int timestamp)
+{
+   time_t  tim;
+   struct tm   *tmPtr;
+
+   tim = timestamp;
+   tmPtr   = localtime();
+
+   strftime( dest->s, DATETIME_SIZE, "%Y-%m-%d %H:%M:%S", tmPtr);
+   dest->len   = DATETIME_LENGTH;
+
+   return 0;
+}
+
+static inline void get_datetime(str *dest)
+{
+   timestamp2isodt(dest, get_current_timestamp());
+}
+
 double str2double(str *string);
 
 #endif /* _CNXCC_H */


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.3:fc11bd1c: cnxcc: define inline functions in cnxcc.h

2015-12-22 Thread grumvalski
Module: kamailio
Branch: 4.3
Commit: fc11bd1c10ca08eb9f49a99174e85c0c549fba7f
URL: 
https://github.com/kamailio/kamailio/commit/fc11bd1c10ca08eb9f49a99174e85c0c549fba7f

Author: grumvalski <federico.cabi...@gmail.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2015-12-22T15:48:28+01:00

cnxcc: define inline functions in cnxcc.h

(cherry picked from commit a9ec529ecee015e79dc60cb8ba8a6686cdf73a7b)

---

Modified: modules/cnxcc/cnxcc.c
Modified: modules/cnxcc/cnxcc.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/fc11bd1c10ca08eb9f49a99174e85c0c549fba7f.diff
Patch: 
https://github.com/kamailio/kamailio/commit/fc11bd1c10ca08eb9f49a99174e85c0c549fba7f.patch

---

diff --git a/modules/cnxcc/cnxcc.c b/modules/cnxcc/cnxcc.c
index e869af4..3d21b3d 100644
--- a/modules/cnxcc/cnxcc.c
+++ b/modules/cnxcc/cnxcc.c
@@ -28,30 +28,6 @@
 
 #include "cnxcc.h"
 
-inline void get_datetime(str *dest)
-{
-   timestamp2isodt(dest, get_current_timestamp());
-}
-
-inline unsigned int get_current_timestamp()
-{
-   return time(NULL);
-}
-
-inline int timestamp2isodt(str *dest, unsigned int timestamp)
-{
-   time_t  tim;
-   struct tm   *tmPtr;
-
-   tim = timestamp;
-   tmPtr   = localtime();
-
-   strftime( dest->s, DATETIME_SIZE, "%Y-%m-%d %H:%M:%S", tmPtr);
-   dest->len   = DATETIME_LENGTH;
-
-   return 0;
-}
-
 double str2double(str *string)
 {
char buffer[string->len + 1];
diff --git a/modules/cnxcc/cnxcc.h b/modules/cnxcc/cnxcc.h
index 9454e16..3973eab 100644
--- a/modules/cnxcc/cnxcc.h
+++ b/modules/cnxcc/cnxcc.h
@@ -31,9 +31,30 @@
 #define DATETIME_LENGTHDATETIME_SIZE - 1
 
 
-inline void get_datetime(str *dest);
-inline unsigned int get_current_timestamp();
-inline int timestamp2isodt(str *dest, unsigned int timestamp);
+static inline unsigned int get_current_timestamp()
+{
+   return time(NULL);
+}
+
+static inline int timestamp2isodt(str *dest, unsigned int timestamp)
+{
+   time_t  tim;
+   struct tm   *tmPtr;
+
+   tim = timestamp;
+   tmPtr   = localtime();
+
+   strftime( dest->s, DATETIME_SIZE, "%Y-%m-%d %H:%M:%S", tmPtr);
+   dest->len   = DATETIME_LENGTH;
+
+   return 0;
+}
+
+static inline void get_datetime(str *dest)
+{
+   timestamp2isodt(dest, get_current_timestamp());
+}
+
 double str2double(str *string);
 
 #endif /* _CNXCC_H */


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.3:7ba20025: tsilo: Fix pointer comparison in ts_set_tm_callbacks

2015-09-23 Thread grumvalski
Module: kamailio
Branch: 4.3
Commit: 7ba20025b12bc6754778de72bbca58b01f9c4f7b
URL: 
https://github.com/kamailio/kamailio/commit/7ba20025b12bc6754778de72bbca58b01f9c4f7b

Author: Chris Double <chris.dou...@double.co.nz>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2015-09-23T16:12:52+02:00

tsilo: Fix pointer comparison in ts_set_tm_callbacks

- Fix cloned ts_transaction pointer comparison to check for
  NULL rather than less than zero. The latter doesn't make
  sense for an allocated pointer.

(cherry picked from commit e304f9d8d4cc16a3b6cca1cdd10dff6d0a18d955)

---

Modified: modules/tsilo/ts_handlers.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/7ba20025b12bc6754778de72bbca58b01f9c4f7b.diff
Patch: 
https://github.com/kamailio/kamailio/commit/7ba20025b12bc6754778de72bbca58b01f9c4f7b.patch

---

diff --git a/modules/tsilo/ts_handlers.c b/modules/tsilo/ts_handlers.c
index 6a1828a..c04ec36 100644
--- a/modules/tsilo/ts_handlers.c
+++ b/modules/tsilo/ts_handlers.c
@@ -40,14 +40,11 @@ int ts_set_tm_callbacks(struct cell *t, sip_msg_t *req, 
ts_transaction_t *ts)
if(t==NULL)
return -1;
 
-   if ( (ts_clone=clone_ts_transaction(ts)) < 0 ) {
+   if ( (ts_clone=clone_ts_transaction(ts)) == NULL ) {
LM_ERR("failed to clone transaction\n");
return -1;
}
 
-   if (ts_clone == NULL) {
-   LM_ERR("transaction clone null\n");
-   }
if ( _tmb.register_tmcb( req, t,TMCB_DESTROY,
ts_onreply, (void*)ts_clone, free_ts_transaction)<0 ) {
LM_ERR("failed to register TMCB for transaction %d:%d\n", 
t->hash_index, t->label);


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.3:0be54999: tsilo: Call LM_DBG with correct transaction information

2015-09-23 Thread grumvalski
Module: kamailio
Branch: 4.3
Commit: 0be54999fe5025cf42fa9d5506e588542c7ec2ed
URL: 
https://github.com/kamailio/kamailio/commit/0be54999fe5025cf42fa9d5506e588542c7ec2ed

Author: Chris Double <chris.dou...@double.co.nz>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2015-09-23T16:12:10+02:00

tsilo: Call LM_DBG with correct transaction information

- Use cb_ptr in ts_onreply LM_DBG call as the ptr variable
  is NULL at that call point and cb_ptr contains the
  transaction information being looked for.

(cherry picked from commit 03f6a49146980338d7e31aec60da551f8b6e7595)

---

Modified: modules/tsilo/ts_handlers.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/0be54999fe5025cf42fa9d5506e588542c7ec2ed.diff
Patch: 
https://github.com/kamailio/kamailio/commit/0be54999fe5025cf42fa9d5506e588542c7ec2ed.patch

---

diff --git a/modules/tsilo/ts_handlers.c b/modules/tsilo/ts_handlers.c
index 7cf7970..6a1828a 100644
--- a/modules/tsilo/ts_handlers.c
+++ b/modules/tsilo/ts_handlers.c
@@ -89,7 +89,7 @@ void ts_onreply(struct cell* t, int type, struct tmcb_params 
*param)
}
ptr = ptr->next;
}
-   LM_DBG("transaction %u:%u not found\n",ptr->tindex, 
ptr->tlabel);
+   LM_DBG("transaction %u:%u not found\n",cb_ptr->tindex, 
cb_ptr->tlabel);
unlock_entry(_e);
} else {
LM_DBG("called with uknown type %d\n", type);


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.2:f7800627: tsilo: Fix pointer comparison in ts_set_tm_callbacks

2015-09-23 Thread grumvalski
Module: kamailio
Branch: 4.2
Commit: f7800627e169c171992a596df28c746aab4f03bc
URL: 
https://github.com/kamailio/kamailio/commit/f7800627e169c171992a596df28c746aab4f03bc

Author: Chris Double <chris.dou...@double.co.nz>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2015-09-23T16:13:28+02:00

tsilo: Fix pointer comparison in ts_set_tm_callbacks

- Fix cloned ts_transaction pointer comparison to check for
  NULL rather than less than zero. The latter doesn't make
  sense for an allocated pointer.

(cherry picked from commit e304f9d8d4cc16a3b6cca1cdd10dff6d0a18d955)

---

Modified: modules/tsilo/ts_handlers.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/f7800627e169c171992a596df28c746aab4f03bc.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f7800627e169c171992a596df28c746aab4f03bc.patch

---

diff --git a/modules/tsilo/ts_handlers.c b/modules/tsilo/ts_handlers.c
index 6a1828a..c04ec36 100644
--- a/modules/tsilo/ts_handlers.c
+++ b/modules/tsilo/ts_handlers.c
@@ -40,14 +40,11 @@ int ts_set_tm_callbacks(struct cell *t, sip_msg_t *req, 
ts_transaction_t *ts)
if(t==NULL)
return -1;
 
-   if ( (ts_clone=clone_ts_transaction(ts)) < 0 ) {
+   if ( (ts_clone=clone_ts_transaction(ts)) == NULL ) {
LM_ERR("failed to clone transaction\n");
return -1;
}
 
-   if (ts_clone == NULL) {
-   LM_ERR("transaction clone null\n");
-   }
if ( _tmb.register_tmcb( req, t,TMCB_DESTROY,
ts_onreply, (void*)ts_clone, free_ts_transaction)<0 ) {
LM_ERR("failed to register TMCB for transaction %d:%d\n", 
t->hash_index, t->label);


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:ede95bf3: tsilo: removed use_domain and usrloc bindings

2015-09-23 Thread grumvalski
Module: kamailio
Branch: master
Commit: ede95bf3b008fa8f2b50e3d6fbc6ea5b2940e721
URL: 
https://github.com/kamailio/kamailio/commit/ede95bf3b008fa8f2b50e3d6fbc6ea5b2940e721

Author: grumvalski <federico.cabi...@gmail.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2015-09-23T16:20:56+02:00

tsilo: removed use_domain and usrloc bindings

---

Modified: modules/tsilo/ts_store.c
Modified: modules/tsilo/tsilo.c
Modified: modules/tsilo/tsilo.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/ede95bf3b008fa8f2b50e3d6fbc6ea5b2940e721.diff
Patch: 
https://github.com/kamailio/kamailio/commit/ede95bf3b008fa8f2b50e3d6fbc6ea5b2940e721.patch

---

diff --git a/modules/tsilo/ts_store.c b/modules/tsilo/ts_store.c
index e4f11ba..8c10b08 100644
--- a/modules/tsilo/ts_store.c
+++ b/modules/tsilo/ts_store.c
@@ -37,8 +37,6 @@
 #include "ts_hash.h"
 #include "ts_store.h"
 
-extern int use_domain;
-
 int ts_store(struct sip_msg* msg, str *puri) {
struct cell *t;
str aor;
diff --git a/modules/tsilo/tsilo.c b/modules/tsilo/tsilo.c
index 411cbc4..84b172e 100644
--- a/modules/tsilo/tsilo.c
+++ b/modules/tsilo/tsilo.c
@@ -30,7 +30,6 @@
 #include "../../script_cb.h"
 #include "../../modules/tm/tm_load.h"
 #include "../../modules/registrar/api.h"
-#include "../../modules/usrloc/usrloc.h"
 #include "../../dset.h"
 #include "../../rpc_lookup.h"
 #include "../../lib/kcore/statistics.h"
@@ -48,10 +47,6 @@ MODULE_VERSION
 struct tm_binds _tmb;
 /** REGISTRAR bind **/
 registrar_api_t _regapi;
-/** USRLOC BIND **/
-usrloc_api_t _ul;
-
-int use_domain = 0;
 
 /** parameters */
 static int hash_size = 2048;
@@ -132,7 +127,6 @@ struct module_exports exports = {
 static int mod_init(void)
 {
unsigned int n;
-   bind_usrloc_t bind_usrloc;
 
/* register the RPC methods */
if(rpc_register_array(rpc_methods)!=0)
@@ -151,20 +145,7 @@ static int mod_init(void)
LM_ERR("cannot load REGISTRAR API\n");
return -1;
}
-   /* load UL-Bindings */
-   bind_usrloc = (bind_usrloc_t)find_export("ul_bind_usrloc", 1, 0);
-
-   if (!bind_usrloc) {
-   LM_ERR("could not load the USRLOC API\n");
-   return -1;
-   }
-
-   if (bind_usrloc(&_ul) < 0) {
-   LM_ERR("could not load the USRLOC API\n");
-   return -1;
-   }
 
-   use_domain = _ul.use_domain;
/* sanitize hash_size */
if (hash_size < 1){
LM_WARN("hash_size is smaller "
diff --git a/modules/tsilo/tsilo.h b/modules/tsilo/tsilo.h
index 90c965c..1daf4d4 100644
--- a/modules/tsilo/tsilo.h
+++ b/modules/tsilo/tsilo.h
@@ -23,15 +23,11 @@
 
 #include "../../modules/tm/tm_load.h"
 #include "../../modules/registrar/api.h"
-#include "../../modules/usrloc/usrloc.h"
 
 /** TM bind */
 extern struct tm_binds _tmb;
 /** REGISTRAR bind */
 extern registrar_api_t _regapi;
 /** USRLOC BIND **/
-extern usrloc_api_t _ul;
-
-extern int use_domain;
 
 #endif


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:98cce9c0: tsilo: removed usrloc dependency from documentation

2015-09-23 Thread grumvalski
Module: kamailio
Branch: master
Commit: 98cce9c07bb4437b607ba6aa687411edbd7e29eb
URL: 
https://github.com/kamailio/kamailio/commit/98cce9c07bb4437b607ba6aa687411edbd7e29eb

Author: grumvalski <federico.cabi...@gmail.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2015-09-23T16:23:17+02:00

tsilo: removed usrloc dependency from documentation

---

Modified: modules/tsilo/doc/tsilo_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/98cce9c07bb4437b607ba6aa687411edbd7e29eb.diff
Patch: 
https://github.com/kamailio/kamailio/commit/98cce9c07bb4437b607ba6aa687411edbd7e29eb.patch

---

diff --git a/modules/tsilo/doc/tsilo_admin.xml 
b/modules/tsilo/doc/tsilo_admin.xml
index 43f4bac..2b16a3f 100644
--- a/modules/tsilo/doc/tsilo_admin.xml
+++ b/modules/tsilo/doc/tsilo_admin.xml
@@ -51,11 +51,6 @@



-   USRLOC--usrloc module-- 
according to the value of use_domain option, domain part 
of the r-uri will be used to store the transaction.
-   
-   
-   
-   
SL




___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.2:0adb7dbf: tsilo: Call LM_DBG with correct transaction information

2015-09-23 Thread grumvalski
Module: kamailio
Branch: 4.2
Commit: 0adb7dbff65131d75e5195569af876ce713c9838
URL: 
https://github.com/kamailio/kamailio/commit/0adb7dbff65131d75e5195569af876ce713c9838

Author: Chris Double <chris.dou...@double.co.nz>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2015-09-23T16:13:23+02:00

tsilo: Call LM_DBG with correct transaction information

- Use cb_ptr in ts_onreply LM_DBG call as the ptr variable
  is NULL at that call point and cb_ptr contains the
  transaction information being looked for.

(cherry picked from commit 03f6a49146980338d7e31aec60da551f8b6e7595)

---

Modified: modules/tsilo/ts_handlers.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/0adb7dbff65131d75e5195569af876ce713c9838.diff
Patch: 
https://github.com/kamailio/kamailio/commit/0adb7dbff65131d75e5195569af876ce713c9838.patch

---

diff --git a/modules/tsilo/ts_handlers.c b/modules/tsilo/ts_handlers.c
index 7cf7970..6a1828a 100644
--- a/modules/tsilo/ts_handlers.c
+++ b/modules/tsilo/ts_handlers.c
@@ -89,7 +89,7 @@ void ts_onreply(struct cell* t, int type, struct tmcb_params 
*param)
}
ptr = ptr->next;
}
-   LM_DBG("transaction %u:%u not found\n",ptr->tindex, 
ptr->tlabel);
+   LM_DBG("transaction %u:%u not found\n",cb_ptr->tindex, 
cb_ptr->tlabel);
unlock_entry(_e);
} else {
LM_DBG("called with uknown type %d\n", type);


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:5147f202: tsilo: update README

2015-09-23 Thread grumvalski
Module: kamailio
Branch: master
Commit: 5147f202520730f2521bd0081c2e7610fa3553b4
URL: 
https://github.com/kamailio/kamailio/commit/5147f202520730f2521bd0081c2e7610fa3553b4

Author: grumvalski <federico.cabi...@gmail.com>
Committer: grumvalski <federico.cabi...@gmail.com>
Date: 2015-09-23T16:23:45+02:00

tsilo: update README

---

Modified: modules/tsilo/README

---

Diff:  
https://github.com/kamailio/kamailio/commit/5147f202520730f2521bd0081c2e7610fa3553b4.diff
Patch: 
https://github.com/kamailio/kamailio/commit/5147f202520730f2521bd0081c2e7610fa3553b4.patch

---

diff --git a/modules/tsilo/README b/modules/tsilo/README
index 4af5bcc..d9e16e5 100644
--- a/modules/tsilo/README
+++ b/modules/tsilo/README
@@ -10,7 +10,7 @@ Federico Cabiddu
 
<federico.cabi...@gmail.com>
 
-   Copyright © 2015 Federico Cabiddu
+   Copyright © 2015 Federico Cabiddu
  __
 
Table of Contents
@@ -93,7 +93,7 @@ Chapter 1. Admin Guide
(R-URI) and add branches to them later if new contacts for the AOR are
added.
 
-   For each message, the modules stores "Request-URI" ("R-URI"), URI and
+   For each message, the modules stores “Request-URI” (“R-URI”), URI 
and
the internal transaction index and label.
 
When a transaction is destroyed by the TM module, it is removed from
@@ -110,9 +110,6 @@ Chapter 1. Admin Guide
  * REGISTRAR--registrar module-- used to lookup for new contacts and
update the dset for the r-uri.
  * TM--transaction module-- used to send SIP requests.
- * USRLOC--usrloc module-- according to the value of use_domain
-   option, domain part of the r-uri will be used to store the
-   transaction.
  * SL
 
 2.2. External libraries or applications
@@ -132,7 +129,7 @@ Chapter 1. Admin Guide
must be a power of two, otherwise it will be rounded down to the
nearest power of two.
 
-   Default value is "2048".
+   Default value is “2048”.
 
Example 1.1. Set hash_size parameter
 ...


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:b525ada2: modules/nathelper: don't include enclosing bracket in contact uri in set_contact_alias

2015-05-10 Thread grumvalski
Module: kamailio
Branch: master
Commit: b525ada2d12bf85c385a5f97859afd5d52405354
URL: 
https://github.com/kamailio/kamailio/commit/b525ada2d12bf85c385a5f97859afd5d52405354

Author: Federico Cabiddu federico.cabi...@gmail.com
Committer: grumvalski federico.cabi...@gmail.com
Date: 2015-05-09T18:17:28+02:00

modules/nathelper: don't include enclosing bracket in contact uri in 
set_contact_alias

---

Modified: modules/nathelper/nathelper.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/b525ada2d12bf85c385a5f97859afd5d52405354.diff
Patch: 
https://github.com/kamailio/kamailio/commit/b525ada2d12bf85c385a5f97859afd5d52405354.patch

---

diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c
index 14880a7..f6791db 100644
--- a/modules/nathelper/nathelper.c
+++ b/modules/nathelper/nathelper.c
@@ -921,8 +921,8 @@ set_contact_alias_f(struct sip_msg* msg, char* str1, char* 
str2)
pkg_free(buf);
return -1;
}
-   c-uri.s = buf;
-   c-uri.len = len;
+   c-uri.s = buf + br;
+   c-uri.len = len -2*br;
 
return 1;
 }


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:e7dc20f4: modules/tsilo: return from ts_store if transaction is not defined

2015-03-29 Thread grumvalski
Module: kamailio
Branch: master
Commit: e7dc20f48c674b0eca5419c93e05a430a5b20e71
URL: 
https://github.com/kamailio/kamailio/commit/e7dc20f48c674b0eca5419c93e05a430a5b20e71

Author: grumvalski federico.cabi...@gmail.com
Committer: grumvalski federico.cabi...@gmail.com
Date: 2015-03-29T17:48:20+02:00

modules/tsilo: return from ts_store if transaction is not defined

---

Modified: modules/tsilo/ts_hash.c
Modified: modules/tsilo/ts_store.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/e7dc20f48c674b0eca5419c93e05a430a5b20e71.diff
Patch: 
https://github.com/kamailio/kamailio/commit/e7dc20f48c674b0eca5419c93e05a430a5b20e71.patch

---

diff --git a/modules/tsilo/ts_hash.c b/modules/tsilo/ts_hash.c
index 6225db6..cf529ee 100644
--- a/modules/tsilo/ts_hash.c
+++ b/modules/tsilo/ts_hash.c
@@ -297,7 +297,7 @@ void remove_ts_urecord(ts_urecord_t* _r)
 int insert_ts_transaction(struct cell* t, struct sip_msg* msg, struct 
ts_urecord* _r)
 {
ts_transaction_t *ptr, *prev;
-ts_transaction_t* ts;
+ts_transaction_t* ts;
 
unsigned int tindex;
unsigned int tlabel;
diff --git a/modules/tsilo/ts_store.c b/modules/tsilo/ts_store.c
index 76ab9f6..48d1441 100644
--- a/modules/tsilo/ts_store.c
+++ b/modules/tsilo/ts_store.c
@@ -46,6 +46,11 @@ int ts_store(struct sip_msg* msg) {
t = _tmb.t_gett();
ruri = msg-first_line.u.request.uri;
 
+   if (!t || t==T_UNDEFINED) {
+   LM_ERR(no transaction defined for %.*s\n, ruri.len, ruri.s);
+   return -1;
+   }
+   
LM_DBG(storing transaction %u:%u for r-uri: %.*s\n, t-hash_index, 
t-label, ruri.len, ruri.s);
 
lock_entry_by_ruri(ruri);


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.2:c44df47b: modules/tsilo: return from ts_store if transaction is not defined

2015-03-29 Thread grumvalski
Module: kamailio
Branch: 4.2
Commit: c44df47b7e461a51af43b75fa0122704063ff8dc
URL: 
https://github.com/kamailio/kamailio/commit/c44df47b7e461a51af43b75fa0122704063ff8dc

Author: grumvalski federico.cabi...@gmail.com
Committer: grumvalski federico.cabi...@gmail.com
Date: 2015-03-29T18:11:21+02:00

modules/tsilo: return from ts_store if transaction is not defined

(cherry picked from commit e7dc20f48c674b0eca5419c93e05a430a5b20e71)

---

Modified: modules/tsilo/ts_hash.c
Modified: modules/tsilo/ts_store.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/c44df47b7e461a51af43b75fa0122704063ff8dc.diff
Patch: 
https://github.com/kamailio/kamailio/commit/c44df47b7e461a51af43b75fa0122704063ff8dc.patch

---

diff --git a/modules/tsilo/ts_hash.c b/modules/tsilo/ts_hash.c
index 089f425..31e1dcf 100644
--- a/modules/tsilo/ts_hash.c
+++ b/modules/tsilo/ts_hash.c
@@ -297,7 +297,7 @@ void remove_ts_urecord(ts_urecord_t* _r)
 int insert_ts_transaction(struct cell* t, struct sip_msg* msg, struct 
ts_urecord* _r)
 {
ts_transaction_t *ptr, *prev;
-ts_transaction_t* ts;
+ts_transaction_t* ts;
 
unsigned int tindex;
unsigned int tlabel;
diff --git a/modules/tsilo/ts_store.c b/modules/tsilo/ts_store.c
index 76ab9f6..48d1441 100644
--- a/modules/tsilo/ts_store.c
+++ b/modules/tsilo/ts_store.c
@@ -46,6 +46,11 @@ int ts_store(struct sip_msg* msg) {
t = _tmb.t_gett();
ruri = msg-first_line.u.request.uri;
 
+   if (!t || t==T_UNDEFINED) {
+   LM_ERR(no transaction defined for %.*s\n, ruri.len, ruri.s);
+   return -1;
+   }
+   
LM_DBG(storing transaction %u:%u for r-uri: %.*s\n, t-hash_index, 
t-label, ruri.len, ruri.s);
 
lock_entry_by_ruri(ruri);


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:34fd472e: modules/cdp: added src_addr parameter in peer definition

2015-03-26 Thread grumvalski
Module: kamailio
Branch: master
Commit: 34fd472e9d7bd5821d6383958f7dd55648ac5daa
URL: 
https://github.com/kamailio/kamailio/commit/34fd472e9d7bd5821d6383958f7dd55648ac5daa

Author: grumvalski federico.cabi...@gmail.com
Committer: grumvalski federico.cabi...@gmail.com
Date: 2015-01-18T08:19:01+01:00

modules/cdp: added src_addr parameter in peer definition

---

Modified: modules/cdp/config.h
Modified: modules/cdp/configexample/ConfigExample.xml
Modified: modules/cdp/configparser.c
Modified: modules/cdp/peer.c
Modified: modules/cdp/peer.h
Modified: modules/cdp/peermanager.c
Modified: modules/cdp/receiver.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/34fd472e9d7bd5821d6383958f7dd55648ac5daa.diff
Patch: 
https://github.com/kamailio/kamailio/commit/34fd472e9d7bd5821d6383958f7dd55648ac5daa.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev