[Pkg-voip-commits] r9647 - in /kamailio/trunk/debian: ./ patches/ patches/upstream/

maniac-guest at alioth.debian.org maniac-guest at alioth.debian.org
Wed Apr 18 06:33:03 UTC 2012


Author: maniac-guest
Date: Wed Apr 18 06:33:02 2012
New Revision: 9647

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=9647
Log:
upstream patches

Added:
    kamailio/trunk/debian/patches/upstream/0007-snmpstats-safe-destroy-in-case-of-invalid-startup.patch
    kamailio/trunk/debian/patches/upstream/0008-modules_k-siptrace-fixed-function-pipport2su.-error-.patch
    kamailio/trunk/debian/patches/upstream/0009-dialog-k-match-on-callid-and-ftag-for-no-ACK-ed-dial.patch
    kamailio/trunk/debian/patches/upstream/0010-ndb_redis-try-to-reconnect-if-query-to-redis-server-.patch
    kamailio/trunk/debian/patches/upstream/0011-tls-check-for-support-of-ssl2.patch
    kamailio/trunk/debian/patches/upstream/0012-kamailio.cfg-add-colon-before-the-port-for-voicemail.patch
    kamailio/trunk/debian/patches/upstream/0013-module-modules-sipcapture-fixed-socket_info-structur.patch
    kamailio/trunk/debian/patches/upstream/0014-uac-k-support-for-407-challenge-to-registrations.patch
    kamailio/trunk/debian/patches/upstream/0015-modules-tm-Filled-in-the-snd-structure-for-event_rou.patch
    kamailio/trunk/debian/patches/upstream/0016-dns-srv-load-balancing-distribution-fix.patch
    kamailio/trunk/debian/patches/upstream/0017-call_control-avoid-internal-flags-conflicts-with-med.patch
    kamailio/trunk/debian/patches/upstream/0018-modules-sipcapture-added-check-for-corrupted-and-def.patch
    kamailio/trunk/debian/patches/upstream/0019-sqlops-check-for-DB_CAP_RAW_QUERY-of-DB-connection.patch
    kamailio/trunk/debian/patches/upstream/0020-parser-sdp-allow-boundary-value-between-quotes.patch
    kamailio/trunk/debian/patches/upstream/0021-core-include-str.h-in-parse_param.h-to-avoid-compile.patch
    kamailio/trunk/debian/patches/upstream/0022-tm-fix-the-multiple-t_suspend-t_continue-scenario.patch
    kamailio/trunk/debian/patches/upstream/0023-modules_k-siptrace-Fixed-0-termination-for-tmp_pippo.patch
    kamailio/trunk/debian/patches/upstream/0024-debugger-safe-wrapper-around-cfg-name.patch
    kamailio/trunk/debian/patches/upstream/0025-maxfwd-k-return-2-false-if-MF-header-cannot-be-proce.patch
    kamailio/trunk/debian/patches/upstream/0026-pua_reginfo-fix-for-state-of-the-registration-during.patch
    kamailio/trunk/debian/patches/upstream/0027-pua_reginfo-propoer-call-id-buffer-when-constructing.patch
Modified:
    kamailio/trunk/debian/changelog
    kamailio/trunk/debian/patches/series

Modified: kamailio/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/changelog?rev=9647&op=diff
==============================================================================
--- kamailio/trunk/debian/changelog (original)
+++ kamailio/trunk/debian/changelog Wed Apr 18 06:33:02 2012
@@ -24,7 +24,7 @@
   * debian/copyright
     + using copyright-format/1.0/
 
- -- Victor Seva <linuxmaniac at torreviejawireless.org>  Mon, 26 Mar 2012 08:33:42 +0200
+ -- Victor Seva <linuxmaniac at torreviejawireless.org>  Wed, 18 Apr 2012 08:31:49 +0200
 
 kamailio (1.5.1-2) unstable; urgency=low
 

Modified: kamailio/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/series?rev=9647&op=diff
==============================================================================
--- kamailio/trunk/debian/patches/series (original)
+++ kamailio/trunk/debian/patches/series Wed Apr 18 06:33:02 2012
@@ -2,6 +2,29 @@
 upstream/0002-xmlops-fixed-internal-module-name.patch
 upstream/0003-regex_mod-Fix-a-double-freeing-in-free_shared_memory.patch
 upstream/0004-core-added-back-the-option-to-use-name-IDs-for-tos-s.patch
+upstream/0005-modules_k-dialog-fix-dlg_var-return-value-in-case-of.patch
+upstream/0006-rtpproxy-proper-iovec-size-for-rtpproxy-commands.patch
+upstream/0007-snmpstats-safe-destroy-in-case-of-invalid-startup.patch
+upstream/0008-modules_k-siptrace-fixed-function-pipport2su.-error-.patch
+upstream/0009-dialog-k-match-on-callid-and-ftag-for-no-ACK-ed-dial.patch
+upstream/0010-ndb_redis-try-to-reconnect-if-query-to-redis-server-.patch
+upstream/0011-tls-check-for-support-of-ssl2.patch
+upstream/0012-kamailio.cfg-add-colon-before-the-port-for-voicemail.patch
+upstream/0013-module-modules-sipcapture-fixed-socket_info-structur.patch
+upstream/0014-uac-k-support-for-407-challenge-to-registrations.patch
+upstream/0015-modules-tm-Filled-in-the-snd-structure-for-event_rou.patch
+upstream/0016-dns-srv-load-balancing-distribution-fix.patch
+upstream/0017-call_control-avoid-internal-flags-conflicts-with-med.patch
+upstream/0018-modules-sipcapture-added-check-for-corrupted-and-def.patch
+upstream/0019-sqlops-check-for-DB_CAP_RAW_QUERY-of-DB-connection.patch
+upstream/0020-parser-sdp-allow-boundary-value-between-quotes.patch
+upstream/0021-core-include-str.h-in-parse_param.h-to-avoid-compile.patch
+upstream/0022-tm-fix-the-multiple-t_suspend-t_continue-scenario.patch
+upstream/0023-modules_k-siptrace-Fixed-0-termination-for-tmp_pippo.patch
+upstream/0024-debugger-safe-wrapper-around-cfg-name.patch
+upstream/0025-maxfwd-k-return-2-false-if-MF-header-cannot-be-proce.patch
+upstream/0026-pua_reginfo-fix-for-state-of-the-registration-during.patch
+upstream/0027-pua_reginfo-propoer-call-id-buffer-when-constructing.patch
 no_lib64_on_64_bits.patch
 no_INSTALL_file.patch
 spelling-errors.patch

Added: kamailio/trunk/debian/patches/upstream/0007-snmpstats-safe-destroy-in-case-of-invalid-startup.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0007-snmpstats-safe-destroy-in-case-of-invalid-startup.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0007-snmpstats-safe-destroy-in-case-of-invalid-startup.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0007-snmpstats-safe-destroy-in-case-of-invalid-startup.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,75 @@
+From b8b6d22d3407d01a41b127672b1533a0b42abe03 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Tue, 31 Jan 2012 23:08:02 +0100
+Subject: [PATCH] snmpstats: safe destroy in case of invalid startup
+
+- some pointers were not intialized yet, but due to destroy of no-startup
+  they were accessed
+- reported by Klaus Feichtinger
+(cherry picked from commit 06e71ad96e8f13bafac1fa5d968538f98bd08df5)
+---
+ modules_k/snmpstats/interprocess_buffer.c |   23 ++++++++++++++++++-----
+ 1 files changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/modules_k/snmpstats/interprocess_buffer.c b/modules_k/snmpstats/interprocess_buffer.c
+index c36b079..3ad7113 100644
+--- a/modules_k/snmpstats/interprocess_buffer.c
++++ b/modules_k/snmpstats/interprocess_buffer.c
+@@ -61,15 +61,15 @@
+  *
+  *    2) maps a given aor to a contact list. 
+  */
+-hashSlot_t *hashTable;
++hashSlot_t *hashTable = NULL;
+ 
+ /*! All interprocess communication is stored between these two declarations. */
+-interprocessBuffer_t *frontRegUserTableBuffer;
+-interprocessBuffer_t *endRegUserTableBuffer;
++interprocessBuffer_t *frontRegUserTableBuffer = NULL;
++interprocessBuffer_t *endRegUserTableBuffer = NULL;
+ 
+ /*! This is to protect the potential racecondition in which a command is added to
+  * the buffer while it is being consumed */
+-gen_lock_t           *interprocessCBLock;
++gen_lock_t           *interprocessCBLock = NULL;
+ 
+ /*!
+  * This function takes an element of the interprocess buffer passed to it, and
+@@ -103,12 +103,23 @@ int initInterprocessBuffers(void)
+ 	 * command was received while the interprocess buffer was being consumed.
+ 	 */
+ 	interprocessCBLock = lock_alloc();
++	if(interprocessCBLock==NULL)
++	{
++        LM_ERR("cannot allocate the lock\n");
++        shm_free(frontRegUserTableBuffer);
++        frontRegUserTableBuffer = NULL;
++        shm_free(endRegUserTableBuffer);
++        endRegUserTableBuffer = NULL;
++        return -1;
++	}
+ 	lock_init(interprocessCBLock);
+ 
+ 	hashTable = createHashTable(HASH_SIZE);
+     if(hashTable == NULL)
+     {
+         LM_ERR("no more shared memory\n");
++		lock_destroy(interprocessCBLock);
++		lock_dealloc(interprocessCBLock);
+         shm_free(frontRegUserTableBuffer);
+         frontRegUserTableBuffer = NULL;
+         shm_free(endRegUserTableBuffer);
+@@ -351,7 +362,9 @@ void freeInterprocessBuffer(void)
+ {
+     interprocessBuffer_t *currentBuffer, *previousBuffer;
+ 
+-	if (frontRegUserTableBuffer->next == NULL) {
++	if (frontRegUserTableBuffer==NULL
++			|| frontRegUserTableBuffer->next == NULL
++			|| endRegUserTableBuffer==NULL) {
+         LM_DBG("Nothing to clean\n");
+ 		return;
+ 	}
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0008-modules_k-siptrace-fixed-function-pipport2su.-error-.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0008-modules_k-siptrace-fixed-function-pipport2su.-error-.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0008-modules_k-siptrace-fixed-function-pipport2su.-error-.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0008-modules_k-siptrace-fixed-function-pipport2su.-error-.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,114 @@
+From 06d1739e187cbdc4903645b99e2702e864f7cbc6 Mon Sep 17 00:00:00 2001
+From: Alexandr Dubovikov <alexandr.dubovikov at gmail.com>
+Date: Fri, 3 Feb 2012 16:12:38 +0100
+Subject: [PATCH] modules_k:siptrace  fixed function pipport2su. (error if url
+ doesn't have port) 	Thanks David Kovarik for report.
+ (cherry picked from commit
+ 830544e5b349bf808fb0f1ac12cf08610181c64d)
+
+---
+ modules_k/siptrace/siptrace.c |   54 +++++++++++++++++++++++-----------------
+ 1 files changed, 31 insertions(+), 23 deletions(-)
+
+diff --git a/modules_k/siptrace/siptrace.c b/modules_k/siptrace/siptrace.c
+index a912fb4..ccdf555 100644
+--- a/modules_k/siptrace/siptrace.c
++++ b/modules_k/siptrace/siptrace.c
+@@ -1621,6 +1621,7 @@ static int pipport2su (char *pipport, union sockaddr_union *tmp_su, unsigned int
+ 	char *p, *host_s;
+ 	str port_str, host_uri;
+ 	unsigned len = 0;
++	char tmp_piport[256];
+ 
+ 	/*parse protocol */
+ 	if(strncmp(pipport, "udp:",4) == 0) *proto = IPPROTO_UDP;
+@@ -1634,42 +1635,49 @@ static int pipport2su (char *pipport, union sockaddr_union *tmp_su, unsigned int
+ 		LM_ERR("bad protocol %s\n", pipport);
+ 		return -1;
+ 	}
++	
++	if((len = strlen(pipport)) > 256) {
++		LM_ERR("too big pipport\n");
++		goto error;
++	}
++
++	/* our tmp string */
++        strncpy(tmp_piport, pipport, len);
++
++	len = 0;
+ 
+ 	/*separate proto and host */
+-	p = pipport+cutlen;
++	p = tmp_piport+cutlen;
+ 	if( (*(p)) == '\0') {
+ 		LM_ERR("malformed ip address\n");
+-		return -1;
++		goto error;
+ 	}
+ 	host_s=p;
+ 
+ 	if( (p = strrchr(p+1, ':')) == 0 ) {
+-		LM_ERR("no port specified\n");
+-		return -1;
+-	}
+-	/*the address contains a port number*/
+-	*p = '\0';
+-	p++;
+-	port_str.s = p;
+-	port_str.len = strlen(p);
+-	LM_DBG("the port string is %s\n", p);
+-	if(str2int(&port_str, &port_no) != 0 ) {
+-		LM_ERR("there is not a valid number port\n");
+-		return -1;
++		LM_DBG("no port specified\n");
++		port_no = 0;
+ 	}
+-	*p = '\0';
+-	if (port_no<1024  || port_no>65536)
+-	{
+-		LM_ERR("invalid port number; must be in [1024,65536]\n");
+-		return -1;
+-	}
+-
++	else {
++        	/*the address contains a port number*/
++        	*p = '\0';
++        	p++;
++        	port_str.s = p;
++        	port_str.len = strlen(p);
++        	LM_DBG("the port string is %s\n", p);
++        	if(str2int(&port_str, &port_no) != 0 ) {
++	        	LM_ERR("there is not a valid number port\n");
++	        	goto error;
++        	}
++        	*p = '\0';
++        }
++        
+ 	/* now IPv6 address has no brakets. It should be fixed! */
+ 	if (host_s[0] == '[') {
+ 		len = strlen(host_s + 1) - 1;
+ 		if(host_s[len+1] != ']') {
+ 			LM_ERR("bracket not closed\n");
+-			return -1;
++			goto error;
+ 		}
+ 		memmove(host_s, host_s + 1, len);
+ 		host_s[len] = '\0';
+@@ -1678,7 +1686,6 @@ static int pipport2su (char *pipport, union sockaddr_union *tmp_su, unsigned int
+ 	host_uri.s = host_s;
+ 	host_uri.len = strlen(host_s);
+ 
+-
+ 	/* check if it's an ip address */
+ 	if (((ip=str2ip(&host_uri))!=0)
+ #ifdef  USE_IPV6
+@@ -1690,5 +1697,6 @@ static int pipport2su (char *pipport, union sockaddr_union *tmp_su, unsigned int
+ 
+ 	}
+ 
++error:
+ 	return -1;
+ }
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0009-dialog-k-match-on-callid-and-ftag-for-no-ACK-ed-dial.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0009-dialog-k-match-on-callid-and-ftag-for-no-ACK-ed-dial.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0009-dialog-k-match-on-callid-and-ftag-for-no-ACK-ed-dial.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0009-dialog-k-match-on-callid-and-ftag-for-no-ACK-ed-dial.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,38 @@
+From 08782d29cc81a60e3c479a08c65b06d4c73fbc97 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Thu, 9 Feb 2012 15:28:44 +0100
+Subject: [PATCH] dialog(k): match on callid and ftag for no ACK'ed dialogs
+
+- some of the TM callbacks look for the dialog with initial INVITE that
+  has no to-tag yet, even that the callback is run on 200ok and dialog was
+  updated with this field
+- reported by Jon Bergli Heier
+(cherry picked from commit 390383e2d0dff755ff9f0eb6a6b1fe627dc29949)
+---
+ modules_k/dialog/dlg_hash.h |   10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/modules_k/dialog/dlg_hash.h b/modules_k/dialog/dlg_hash.h
+index fa7566b..06fbd75 100644
+--- a/modules_k/dialog/dlg_hash.h
++++ b/modules_k/dialog/dlg_hash.h
+@@ -458,6 +458,16 @@ static inline int match_dialog(dlg_cell_t *dlg, str *callid,
+ 				*dir = DLG_DIR_DOWNSTREAM;
+ 				return 1;
+ 			}
++			/* if no ACK yet, might be a lookup of dlg from a TM callback that
++			 * runs on 200ok but with initial INVITE that has no to-tag */
++			if(ttag->len==0 && dlg->state==DLG_STATE_CONFIRMED_NA
++					&& dlg->tag[DLG_CALLER_LEG].len == ftag->len &&
++					   strncmp(dlg->tag[DLG_CALLER_LEG].s, ftag->s, ftag->len)==0 &&
++					   strncmp(dlg->callid.s, callid->s, callid->len)==0) {
++
++				*dir = DLG_DIR_DOWNSTREAM;
++				return 1;
++			}
+ 		}
+ 	}
+ 
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0010-ndb_redis-try-to-reconnect-if-query-to-redis-server-.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0010-ndb_redis-try-to-reconnect-if-query-to-redis-server-.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0010-ndb_redis-try-to-reconnect-if-query-to-redis-server-.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0010-ndb_redis-try-to-reconnect-if-query-to-redis-server-.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,95 @@
+From 1ad616a0dc9b689d412ab9e117949d4ba9f4dadb Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Fri, 17 Feb 2012 15:46:12 +0100
+Subject: [PATCH] ndb_redis: try to reconnect if query to redis server fails
+
+- credits to Javier Gallart for testing
+(cherry picked from commit 4a6a2cfd2df535c0f293d0d944685a702b45af0b)
+---
+ modules/ndb_redis/redis_client.c |   63 ++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 63 insertions(+), 0 deletions(-)
+
+diff --git a/modules/ndb_redis/redis_client.c b/modules/ndb_redis/redis_client.c
+index 9f4ffc4..234bb3a 100644
+--- a/modules/ndb_redis/redis_client.c
++++ b/modules/ndb_redis/redis_client.c
+@@ -199,6 +199,61 @@ redisc_server_t *redisc_get_server(str *name)
+ /**
+  *
+  */
++int redisc_reconnect_server(redisc_server_t *rsrv)
++{
++	char *addr;
++	unsigned int port, db;
++	param_t *pit = NULL;
++	struct timeval tv;
++
++	tv.tv_sec = 1;
++	tv.tv_usec = 0;
++	addr = "127.0.0.1";
++	port = 6379;
++	db = 0;
++	for (pit = rsrv->attrs; pit; pit=pit->next)
++	{
++		if(pit->name.len==4 && strncmp(pit->name.s, "addr", 4)==0) {
++			addr = pit->body.s;
++			addr[pit->body.len] = '\0';
++		} else if(pit->name.len==4 && strncmp(pit->name.s, "port", 4)==0) {
++			if(str2int(&pit->body, &port) < 0)
++				port = 6379;
++		} else if(pit->name.len==2 && strncmp(pit->name.s, "db", 2)==0) {
++			if(str2int(&pit->body, &db) < 0)
++				db = 0;
++		}
++	}
++	if(rsrv->ctxRedis!=NULL) {
++		redisFree(rsrv->ctxRedis);
++		rsrv->ctxRedis = NULL;
++	}
++
++	rsrv->ctxRedis = redisConnectWithTimeout(addr, port, tv);
++	if(!rsrv->ctxRedis)
++		goto err;
++	if (rsrv->ctxRedis->err)
++		goto err2;
++	if (redisCommandNR(rsrv->ctxRedis, "PING"))
++		goto err2;
++	if (redisCommandNR(rsrv->ctxRedis, "SELECT %i", db))
++		goto err2;
++
++	return 0;
++
++err2:
++	LM_ERR("error communicating with redis server [%.*s] (%s:%d/%d): %s\n",
++		rsrv->sname->len, rsrv->sname->s, addr, port, db, rsrv->ctxRedis->errstr);
++	return -1;
++err:
++	LM_ERR("failed to connect to redis server [%.*s] (%s:%d/%d)\n",
++		rsrv->sname->len, rsrv->sname->s, addr, port, db);
++	return -1;
++}
++
++/**
++ *
++ */
+ int redisc_exec(str *srv, str *cmd, str *argv1, str *argv2, str *argv3,
+ 		str *res)
+ {
+@@ -237,6 +292,14 @@ int redisc_exec(str *srv, str *cmd, str *argv1, str *argv2, str *argv3,
+ 	c = cmd->s[cmd->len];
+ 	cmd->s[cmd->len] = '\0';
+ 	rpl->rplRedis = redisCommand(rsrv->ctxRedis, cmd->s);
++	if(rpl->rplRedis == NULL)
++	{
++		/* null reply, reconnect and try again */
++		if(redisc_reconnect_server(rsrv)==0)
++		{
++			rpl->rplRedis = redisCommand(rsrv->ctxRedis, cmd->s);
++		}
++	}
+ 	cmd->s[cmd->len] = c;
+ 	return 0;
+ }
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0011-tls-check-for-support-of-ssl2.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0011-tls-check-for-support-of-ssl2.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0011-tls-check-for-support-of-ssl2.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0011-tls-check-for-support-of-ssl2.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,32 @@
+From ab20bfc85313dc74a965429f257e63021a648f18 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Fri, 24 Feb 2012 10:24:29 +0100
+Subject: [PATCH] tls: check for support of ssl2
+
+- latest distros with newer ssl lib are removing the ssl2 support
+(cherry picked from commit 7c7ed8ad9d62bd501bd2c856a01689a84a0c0711)
+---
+ modules/tls/tls_init.c |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/modules/tls/tls_init.c b/modules/tls/tls_init.c
+index cc16598..70338b1 100644
+--- a/modules/tls/tls_init.c
++++ b/modules/tls/tls_init.c
+@@ -333,10 +333,12 @@ int tls_h_init_si(struct socket_info *si)
+  */
+ static void init_ssl_methods(void)
+ {
++#ifndef OPENSSL_NO_SSL2
+ 	ssl_methods[TLS_USE_SSLv2_cli - 1] = SSLv2_client_method();
+ 	ssl_methods[TLS_USE_SSLv2_srv - 1] = SSLv2_server_method();
+ 	ssl_methods[TLS_USE_SSLv2 - 1] = SSLv2_method();
+-	
++#endif
++
+ 	ssl_methods[TLS_USE_SSLv3_cli - 1] = SSLv3_client_method();
+ 	ssl_methods[TLS_USE_SSLv3_srv - 1] = SSLv3_server_method();
+ 	ssl_methods[TLS_USE_SSLv3 - 1] = SSLv3_method();
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0012-kamailio.cfg-add-colon-before-the-port-for-voicemail.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0012-kamailio.cfg-add-colon-before-the-port-for-voicemail.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0012-kamailio.cfg-add-colon-before-the-port-for-voicemail.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0012-kamailio.cfg-add-colon-before-the-port-for-voicemail.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,27 @@
+From 48d0266797d2154c4154ecefd18366662cca6c0c Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Wed, 29 Feb 2012 19:08:31 +0100
+Subject: [PATCH] kamailio.cfg: add colon before the port for voicemail server
+ (cherry picked from commit
+ 0e3f1ff9507a578d95d02d615d333ef24fe42d87)
+
+---
+ etc/kamailio.cfg |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
+index b7e469d..284cea3 100644
+--- a/etc/kamailio.cfg
++++ b/etc/kamailio.cfg
+@@ -884,7 +884,7 @@ route[TOVOICEMAIL] {
+ 		return;
+ 
+ 	$ru = "sip:" + $avp(oexten) + "@" + $sel(cfg_get.voicemail.srv_ip)
+-				+ $sel(cfg_get.voicemail.srv_port);
++				+ ":" + $sel(cfg_get.voicemail.srv_port);
+ 	route(RELAY);
+ 	exit;
+ #!endif
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0013-module-modules-sipcapture-fixed-socket_info-structur.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0013-module-modules-sipcapture-fixed-socket_info-structur.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0013-module-modules-sipcapture-fixed-socket_info-structur.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0013-module-modules-sipcapture-fixed-socket_info-structur.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,136 @@
+From 9f5a8ac6faed48cbbd02db8d30b5a8d9d30c173c Mon Sep 17 00:00:00 2001
+From: Alexandr Dubovikov <alexandr.dubovikov at gmail.com>
+Date: Mon, 5 Mar 2012 11:56:50 +0100
+Subject: [PATCH] module: modules/sipcapture fixed socket_info structure.
+
+Now users can use $Ri, $rp variables in RAW socket mode.
+(cherry picked from commit f9494494d59d2036f2ed664fbdf4193760662937)
+---
+ modules/sipcapture/sipcapture.c |   94 ++++++++++++++++++++++++++++-----------
+ 1 files changed, 68 insertions(+), 26 deletions(-)
+
+diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
+index c376dd0..926c685 100644
+--- a/modules/sipcapture/sipcapture.c
++++ b/modules/sipcapture/sipcapture.c
+@@ -1431,6 +1431,9 @@ int raw_capture_rcv_loop(int rsock, int port1, int port2, int ipip) {
+ 	unsigned short dst_port;
+ 	unsigned short src_port;
+ 	struct ip_addr dst_ip, src_ip;
++	struct socket_info* si = 0;
++	int tmp_len;
++	
+ 
+ 	for(;;){
+ 
+@@ -1480,28 +1483,6 @@ int raw_capture_rcv_loop(int rsock, int port1, int port2, int ipip) {
+         	        }
+ 	        }
+         									
+-		/*FIL IPs*/
+-		dst_ip.af=AF_INET;
+-	        dst_ip.len=4;
+-        	dst_ip.u.addr32[0]=iph->ip_dst.s_addr;
+-	        /* fill dst_port */
+-        	dst_port=ntohs(udph->uh_dport);
+-	        ip_addr2su(&to, &dst_ip, dst_port);
+-        	/* fill src_port */
+-	        src_port=ntohs(udph->uh_sport);
+-                src_ip.af=AF_INET;
+- 	        src_ip.len=4;
+-                src_ip.u.addr32[0]=iph->ip_src.s_addr;
+-                ip_addr2su(&from, &src_ip, src_port);
+-	        su_setport(&from, src_port);
+-		
+-		ri.src_su=from;
+-                su2ip_addr(&ri.src_ip, &from);
+-                ri.src_port=src_port;
+-                su2ip_addr(&ri.dst_ip, &to);
+-                ri.dst_port=dst_port;
+-                ri.proto=PROTO_UDP;                                
+-
+ 		/* cut off the offset */
+ 	        len -= offset;
+ 
+@@ -1510,13 +1491,74 @@ int raw_capture_rcv_loop(int rsock, int port1, int port2, int ipip) {
+                         continue;
+                 }
+ 
++                /* fill dst_port && src_port */
++                dst_port=ntohs(udph->uh_dport);
++                src_port=ntohs(udph->uh_sport);
++                                                        
++
+                 DBG("PORT: [%d] and [%d]\n", port1, port2);
+                 
+-		if((!port1 && !port2) 
+-		        || (src_port >= port1 && src_port <= port2) || (dst_port >= port1 && dst_port <= port2) 
+-		        || (!port2 && (src_port == port1 || dst_port == port1)))
+-		                          receive_msg(buf+offset, len, &ri);
++		if((!port1 && !port2) || (src_port >= port1 && src_port <= port2) 
++		        || (dst_port >= port1 && dst_port <= port2) 
++		        || (!port2 && (src_port == port1 || dst_port == port1))) {
++		        
++        		/*FIL IPs*/
++        		dst_ip.af=AF_INET;
++        	        dst_ip.len=4;
++                	dst_ip.u.addr32[0]=iph->ip_dst.s_addr;
++
++	                /* fill dst_port */
++        	        ip_addr2su(&to, &dst_ip, dst_port);
++
++                	/* fill src_port */
++                        src_ip.af=AF_INET;
++         	        src_ip.len=4;
++                        src_ip.u.addr32[0]=iph->ip_src.s_addr;
++                        ip_addr2su(&from, &src_ip, src_port);
++        	        su_setport(&from, src_port);
++	
++        		ri.src_su=from;
++                        su2ip_addr(&ri.src_ip, &from);
++                        ri.src_port=src_port;
++                        su2ip_addr(&ri.dst_ip, &to);
++                        ri.dst_port=dst_port;
++                        ri.proto=PROTO_UDP;                                
++
++                        /* a little bit memory */                
++                        si=(struct socket_info*) pkg_malloc(sizeof(struct socket_info));
++                        if (si==0) {                                
++                                LOG(L_ERR, "ERROR: new_sock_info: memory allocation error\n");
++                                return 0;
++                        }
++                        
++                        memset(si, 0, sizeof(struct socket_info));                
++                        si->address = ri.dst_ip; 
++                        si->socket=-1;
++
++	                /* set port & proto */
++                	si->port_no = dst_port;
++	                si->proto=PROTO_UDP;
++                	si->flags=0;
++	                si->addr_info_lst=0;
++	                
++        	        si->port_no_str.s = int2str(si->port_no, &tmp_len);
++        	        si->port_no_str.len = tmp_len;
++	        
++        	        si->address_str.s = ip_addr2a(&si->address);;
++                        si->address_str.len = strlen(si->address_str.s);	                        
++	        
++        	        si->name.len = si->address_str.len;
++	                si->name.s = si->address_str.s;
++
++     	                ri.bind_address=si;		        		        
++		        
++     	                /* and now recieve message */
++        		receive_msg(buf+offset, len, &ri);		                          
++	        	if(si) pkg_free(si);                         
++                }                                
+ 	}
+ 
+ 	return 0;
+ }
++
++
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0014-uac-k-support-for-407-challenge-to-registrations.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0014-uac-k-support-for-407-challenge-to-registrations.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0014-uac-k-support-for-407-challenge-to-registrations.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0014-uac-k-support-for-407-challenge-to-registrations.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,45 @@
+From 13b5952b656a486f6b9aecbc35510b5b39888083 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Sat, 3 Mar 2012 12:34:38 +0100
+Subject: [PATCH] uac(k): support for 407 challenge to registrations
+
+- requested in FS#204, by Oded Resnik
+(cherry picked from commit 2ac96ebcc173a2f1e601b38afa5c9bba5de8c0b5)
+---
+ modules_k/uac/uac_reg.c |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/modules_k/uac/uac_reg.c b/modules_k/uac/uac_reg.c
+index c25712f..d944a10 100644
+--- a/modules_k/uac/uac_reg.c
++++ b/modules_k/uac/uac_reg.c
+@@ -529,7 +529,7 @@ void uac_reg_tm_callback( struct cell *t, int type, struct tmcb_params *ps)
+ 		}
+ 	}
+ 
+-	if(ps->code == 401)
++	if(ps->code == 401 || ps->code == 407)
+ 	{
+ 		if(ri->flags & UAC_REG_AUTHSENT)
+ 		{
+@@ -539,7 +539,7 @@ void uac_reg_tm_callback( struct cell *t, int type, struct tmcb_params *ps)
+ 			ri->flags |= UAC_REG_DISABLED;
+ 			goto done;
+ 		}
+-		hdr = get_autenticate_hdr(ps->rpl, 401);
++		hdr = get_autenticate_hdr(ps->rpl, ps->code);
+ 		if (hdr==0)
+ 		{
+ 			LM_ERR("failed to extract authenticate hdr\n");
+@@ -569,7 +569,7 @@ void uac_reg_tm_callback( struct cell *t, int type, struct tmcb_params *ps)
+ 		s_ruri.s = b_ruri; s_ruri.len = strlen(s_ruri.s);
+ 
+ 		do_uac_auth(&method, &s_ruri, &cred, &auth, response);
+-		new_auth_hdr=build_authorization_hdr(401, &s_ruri, &cred,
++		new_auth_hdr=build_authorization_hdr(ps->code, &s_ruri, &cred,
+ 						&auth, response);
+ 		if (new_auth_hdr==0)
+ 		{
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0015-modules-tm-Filled-in-the-snd-structure-for-event_rou.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0015-modules-tm-Filled-in-the-snd-structure-for-event_rou.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0015-modules-tm-Filled-in-the-snd-structure-for-event_rou.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0015-modules-tm-Filled-in-the-snd-structure-for-event_rou.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,56 @@
+From 709c7498dd6a702a128c0c5c5b953e18d917d44b Mon Sep 17 00:00:00 2001
+From: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
+Date: Tue, 6 Mar 2012 18:10:13 +0000
+Subject: [PATCH] modules/tm: Filled in the $snd() structure for
+ event_route[tm:local-request] (cherry picked from commit
+ 43e7274cad12535fc20d0e669d87939c1c18f399)
+
+---
+ modules/tm/uac.c |   10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/modules/tm/uac.c b/modules/tm/uac.c
+index e6ba762..394c3e3 100644
+--- a/modules/tm/uac.c
++++ b/modules/tm/uac.c
+@@ -86,6 +86,7 @@
+ #include "../../receive.h"
+ #include "../../route.h"
+ #include "../../action.h"
++#include "../../onsend.h"
+ #include "t_lookup.h"
+ #endif
+ 
+@@ -349,6 +350,8 @@ static inline int t_uac_prepare(uac_req_t *uac_r,
+ 				LM_ERR("failed to set dst_uri");
+ 				free_sip_msg(&lreq);
+ 			} else {
++				struct onsend_info onsnd_info;
++
+ 				lreq.force_send_socket = uac_r->dialog->send_sock;
+ 				lreq.rcv.proto = dst.send_sock->proto;
+ 				lreq.rcv.src_ip = dst.send_sock->address;
+@@ -363,6 +366,12 @@ static inline int t_uac_prepare(uac_req_t *uac_r,
+ 				sflag_bk = getsflags();
+ 				tm_xdata_swap(new_cell, &backup_xd, 0);
+ 
++				onsnd_info.to=&dst.to;
++				onsnd_info.send_sock=dst.send_sock;
++				onsnd_info.buf=buf;
++				onsnd_info.len=buf_len;
++				p_onsend=&onsnd_info;
++
+ 				/* run the route */
+ 				backup_route_type = get_route_type();
+ 				set_route_type(LOCAL_ROUTE);
+@@ -378,6 +387,7 @@ static inline int t_uac_prepare(uac_req_t *uac_r,
+ 				set_t(backup_t, backup_branch);
+ 				global_msg_id=backup_msgid;
+ 				set_route_type( backup_route_type );
++				p_onsend=0;
+ 
+ 				/* restore original environment */
+ 				tm_xdata_swap(new_cell, &backup_xd, 1);
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0016-dns-srv-load-balancing-distribution-fix.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0016-dns-srv-load-balancing-distribution-fix.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0016-dns-srv-load-balancing-distribution-fix.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0016-dns-srv-load-balancing-distribution-fix.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,86 @@
+From 8fe854700ce58fa314be3baa721c153ec1935b2a Mon Sep 17 00:00:00 2001
+From: Andrei Pelinescu-Onciul <andrei at iptel.org>
+Date: Fri, 9 Mar 2012 19:12:59 +0100
+Subject: [PATCH] dns: srv load balancing distribution fix
+
+The load distribution when doing SRV based load balancing was not
+completely fair. The first listed server had always an extra
+ (sum_of_weights-weight)/(sum_of_weights*(sum_of_weights+1) chance
+of being selected.
+For example for 2 servers both with weight 50, the first one
+will have an extra (100-50)/100*101 change of being selected =>
+ extra 0.495% which gives a 50.495% - 49.505% distribution
+instead of 50% - 50%. For large weight values this doesn't make a big
+difference (e.g. for 500-500 => 50.049% instead of 50%) but for
+small values it becomes very noticeable (e.g. for 1-1 =>
+ 66% - 33% distribution instead of 50%-50%).
+
+The chance of selecting a 0-weight record was also changed. It was
+ 1/(sum_of_weights+1) and now is 1/(sum_of_weights*1000).
+
+Reported-by: Michal Matyska  michal.matyska iptel org
+(cherry picked from commit d8fe0def83736c204dd1eace89e8ca1823704fc3)
+---
+ dns_cache.c |   18 ++++++++++++++----
+ 1 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/dns_cache.c b/dns_cache.c
+index da8f97d..1a7f1c5 100644
+--- a/dns_cache.c
++++ b/dns_cache.c
+@@ -100,6 +100,8 @@
+ #define DNS_HE_MAX_ADDR 10  /* maxium addresses returne in a hostent struct */
+ #define MAX_CNAME_CHAIN  10
+ #define SPACE_FORMAT "    " /* format of view output */
++#define DNS_SRV_ZERO_W_CHANCE	1000 /* one in a 1000*weight_sum chance for
++										selecting a 0-weight record */
+ 
+ int dns_cache_init=1;	/* if 0, the DNS cache is not initialized at startup */
+ static gen_lock_t* dns_hash_lock=0;
+@@ -2286,6 +2288,7 @@ inline static struct dns_rr* dns_srv_get_nxt_rr(struct dns_hash_entry* e,
+ 	unsigned rand_w;
+ 	int found;
+ 	int saved_idx;
++	int zero_weight; /* number of records with 0 weight */
+ 	int i, idx;
+ 	struct r_sums_entry{
+ 			unsigned r_sum;
+@@ -2307,6 +2310,7 @@ retry:
+ 	prio=((struct srv_rdata*)start_grp->rdata)->priority;
+ 	sum=0;
+ 	saved_idx=-1;
++	zero_weight = 0;
+ 	found=0;
+ 	for (idx=0;rr && (prio==((struct srv_rdata*)rr->rdata)->priority) &&
+ 						(idx < MAX_SRV_GRP_IDX); idx++, rr=rr->next){
+@@ -2328,6 +2332,7 @@ retry:
+ 		if ((saved_idx==-1) || (((struct srv_rdata*)rr->rdata)->weight==0)){
+ 			saved_idx=idx;
+ 		}
++		zero_weight += (((struct srv_rdata*)rr->rdata)->weight == 0);
+ 		sum+=((struct srv_rdata*)rr->rdata)->weight;
+ 		r_sums[idx].r_sum=sum;
+ 		r_sums[idx].rr=rr;
+@@ -2338,10 +2343,15 @@ retry:
+ 		n+=idx; /* next group start idx, last rr */
+ 		srv_reset_tried(tried);
+ 		goto retry;
+-	}else if ((found==1) || ((rand_w=dns_srv_random(sum))==0)){
+-		/* 1. if only one found, avoid a useless random() call or
+-		 * 2. if rand_w==0, immediately select a 0 weight record if present,
+-		 *     or else the first record found
++	}else if ((found==1) || (sum==0) ||
++				(((rand_w=(dns_srv_random(sum-1)+1))==1) && zero_weight &&
++					(dns_srv_random(DNS_SRV_ZERO_W_CHANCE)==0))){
++		/* 1. if only one found, avoid a useless random() call
++		      and select it (saved_idx will point to it).
++		 * 2. if the sum of weights is 0 (all have 0 weight) or
++		 * 3. rand_w==1 and there are records with 0 weight and
++		 *    random(probab. of selecting a 0-weight)
++		 *     immediately select a 0 weight record.
+ 		 *  (this takes care of the 0-weight at the beginning requirement) */
+ 		i=saved_idx; /* saved idx contains either first 0 weight or first
+ 						valid record */
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0017-call_control-avoid-internal-flags-conflicts-with-med.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0017-call_control-avoid-internal-flags-conflicts-with-med.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0017-call_control-avoid-internal-flags-conflicts-with-med.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0017-call_control-avoid-internal-flags-conflicts-with-med.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,45 @@
+From 5114ed746f97fa791423edaae22f2edde24ed916 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Mon, 12 Mar 2012 17:04:17 +0100
+Subject: [PATCH] call_control: avoid internal flags conflicts with mediaproxy
+
+- use internal flag 28 for marking requests handled by call_control, the
+  old value, 30, being used by mediaproxy module, resulting in engaging
+  media relay
+- reported and solution by Reda Aouad
+(cherry picked from commit 55812477d1f4c9ee8726d0ba3cc7b6d3c8835f8a)
+---
+ modules_k/call_control/call_control.c |    2 +-
+ parser/msg_parser.h                   |    3 +++
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/modules_k/call_control/call_control.c b/modules_k/call_control/call_control.c
+index fc3b0fc..2ba7a50 100644
+--- a/modules_k/call_control/call_control.c
++++ b/modules_k/call_control/call_control.c
+@@ -49,7 +49,7 @@
+ 
+ MODULE_VERSION
+ 
+-#define FL_USE_CALL_CONTROL       (1<<30) // use call control for a dialog
++#define FL_USE_CALL_CONTROL       (1<<28) // use call control for a dialog
+ 
+ #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+ # define INLINE inline
+diff --git a/parser/msg_parser.h b/parser/msg_parser.h
+index eee2948..a69953a 100644
+--- a/parser/msg_parser.h
++++ b/parser/msg_parser.h
+@@ -120,6 +120,9 @@ enum request_method {
+ #define FL_ADD_LOCAL_RPORT  (1 << 11) /*!< add 'rport' to local via hdr */
+ #define FL_SDP_BODY     (1 << 12)  /*!< msg has SDP in body */
+ 
++/* WARNING: Value (1 << 28) is temporarily reserved for use in kamailio call_control
++ * module (flag  FL_USE_CALL_CONTROL )! */
++
+ /* WARNING: Value (1 << 29) is temporarily reserved for use in kamailio acc
+  * module (flag FL_REQ_UPSTREAM)! */
+ 
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0018-modules-sipcapture-added-check-for-corrupted-and-def.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0018-modules-sipcapture-added-check-for-corrupted-and-def.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0018-modules-sipcapture-added-check-for-corrupted-and-def.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0018-modules-sipcapture-added-check-for-corrupted-and-def.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,39 @@
+From e139846935fa414b7261a3f951b823a539b97c32 Mon Sep 17 00:00:00 2001
+From: Alexandr Dubovikov <alexandr.dubovikov at gmail.com>
+Date: Wed, 14 Mar 2012 09:29:24 +0100
+Subject: [PATCH] modules/sipcapture: added check for  corrupted and
+ defragmented packets (cherry picked from commit
+ cb8c24f1ef873d16fd5c7edd96e2c0d3847b3dda)
+
+---
+ modules/sipcapture/sipcapture.c |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
+index 926c685..50f384e 100644
+--- a/modules/sipcapture/sipcapture.c
++++ b/modules/sipcapture/sipcapture.c
+@@ -1494,6 +1494,12 @@ int raw_capture_rcv_loop(int rsock, int port1, int port2, int ipip) {
+                 /* fill dst_port && src_port */
+                 dst_port=ntohs(udph->uh_dport);
+                 src_port=ntohs(udph->uh_sport);
++                                              
++                /* if the message has not alpha */
++                if(!isalnum((buf+offset)[0])) {
++                        DBG("not alpha and not digit... skiping...\n");
++                        continue;
++                }
+                                                         
+ 
+                 DBG("PORT: [%d] and [%d]\n", port1, port2);
+@@ -1552,6 +1558,7 @@ int raw_capture_rcv_loop(int rsock, int port1, int port2, int ipip) {
+ 
+      	                ri.bind_address=si;		        		        
+ 		        
++
+      	                /* and now recieve message */
+         		receive_msg(buf+offset, len, &ri);		                          
+ 	        	if(si) pkg_free(si);                         
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0019-sqlops-check-for-DB_CAP_RAW_QUERY-of-DB-connection.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0019-sqlops-check-for-DB_CAP_RAW_QUERY-of-DB-connection.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0019-sqlops-check-for-DB_CAP_RAW_QUERY-of-DB-connection.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0019-sqlops-check-for-DB_CAP_RAW_QUERY-of-DB-connection.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,29 @@
+From 79b46b92828d1954aad391e24147c521b10f5608 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Wed, 14 Mar 2012 10:01:00 +0100
+Subject: [PATCH] sqlops: check for DB_CAP_RAW_QUERY of DB connection
+
+- the module is using raw query capability and DB_CAP_ALL does not
+  include it
+- reported by Pedro Vico, FS#208
+(cherry picked from commit edc4d902135d484d02272a64b7f27447fcb6854e)
+---
+ modules_k/sqlops/sql_api.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/modules_k/sqlops/sql_api.c b/modules_k/sqlops/sql_api.c
+index cc0f090..e92edd1 100644
+--- a/modules_k/sqlops/sql_api.c
++++ b/modules_k/sqlops/sql_api.c
+@@ -151,7 +151,7 @@ int sql_connect(void)
+ 					sc->name.len, sc->name.s);
+ 			return -1;
+ 		}
+-		if (!DB_CAPABILITY(sc->dbf, DB_CAP_ALL))
++		if (!DB_CAPABILITY(sc->dbf, DB_CAP_RAW_QUERY))
+ 		{
+ 			LM_ERR("database module does not have DB_CAP_ALL [%.*s]\n",
+ 					sc->name.len, sc->name.s);
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0020-parser-sdp-allow-boundary-value-between-quotes.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0020-parser-sdp-allow-boundary-value-between-quotes.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0020-parser-sdp-allow-boundary-value-between-quotes.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0020-parser-sdp-allow-boundary-value-between-quotes.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,42 @@
+From 6251a0a65a0b1a456708a7cde9adcb9894f2bfa2 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Wed, 14 Mar 2012 10:57:47 +0100
+Subject: [PATCH] parser/sdp: allow boundary value between quotes
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+- reported by Magnus Nordström, FS#200
+(cherry picked from commit a66242b4f776b43120014b0c56e21c87d254ddcc)
+---
+ parser/sdp/sdp_helpr_funcs.c |   14 ++++++++++++++
+ 1 files changed, 14 insertions(+), 0 deletions(-)
+
+diff --git a/parser/sdp/sdp_helpr_funcs.c b/parser/sdp/sdp_helpr_funcs.c
+index 13d1ca9..751b823 100644
+--- a/parser/sdp/sdp_helpr_funcs.c
++++ b/parser/sdp/sdp_helpr_funcs.c
+@@ -179,6 +179,20 @@ int get_mixed_part_delimiter(str* body, str *mp_delimiter)
+ 		advance(p,1,str_type,error);
+ 	mp_delimiter->len = str_type.len - (int)(p-str_type.s);
+ 	mp_delimiter->s = p;
++	/* check if the boundary value is enclosed in quotes */
++	if(*p=='"' || *p=='\'') {
++		if(mp_delimiter->s[mp_delimiter->len-1]==*p) {
++			mp_delimiter->s = p+1;
++			mp_delimiter->len -= 2;
++			if(mp_delimiter->len<=0) {
++				LM_ERR("invalid boundary field value\n");
++				goto error;
++			}
++		} else {
++			LM_ERR("missing closing quote in boundary field value\n");
++			goto error;
++		}
++	}
+ 	return 1;
+ 
+ error:  
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0021-core-include-str.h-in-parse_param.h-to-avoid-compile.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0021-core-include-str.h-in-parse_param.h-to-avoid-compile.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0021-core-include-str.h-in-parse_param.h-to-avoid-compile.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0021-core-include-str.h-in-parse_param.h-to-avoid-compile.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,27 @@
+From 7efc191ae71d67769aa5e2e26f728a0024fcc8a4 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Tue, 27 Mar 2012 13:56:32 +0200
+Subject: [PATCH] core: include str.h in parse_param.h to avoid compile errors
+
+- it happened when parse_param.h is used first, alone or without any
+  predecessors including str.h
+(cherry picked from commit 8194dfe8f45f688bb9b5332ecdc66ec1423ca77f)
+---
+ parser/parse_param.h |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/parser/parse_param.h b/parser/parse_param.h
+index 1b92de6..edcc62f 100644
+--- a/parser/parse_param.h
++++ b/parser/parse_param.h
+@@ -43,6 +43,7 @@
+ 
+ #include <stdio.h>
+ 
++#include "../str.h"
+ 
+ /*! \brief
+  * Supported types of parameters
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0022-tm-fix-the-multiple-t_suspend-t_continue-scenario.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0022-tm-fix-the-multiple-t_suspend-t_continue-scenario.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0022-tm-fix-the-multiple-t_suspend-t_continue-scenario.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0022-tm-fix-the-multiple-t_suspend-t_continue-scenario.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,32 @@
+From 66241f5e8dc2876441c1e91152adfe3a13bbe373 Mon Sep 17 00:00:00 2001
+From: Miklos Tirpak <miklos at iptel.org>
+Date: Thu, 29 Mar 2012 10:45:02 +0200
+Subject: [PATCH] tm: fix the multiple t_suspend+t_continue scenario
+
+When t_suspend() was called in the route block executed
+by t_continue(), the function did not recognize the newly
+added blind UAC and claimed that there is no new branch added.
+This resulted in the transaction being killed by t_continue().
+(cherry picked from commit 9ae149ba25ee6467da1d95dd435995b9a59166a3)
+---
+ modules/tm/t_suspend.c |    4 +---
+ 1 files changed, 1 insertions(+), 3 deletions(-)
+
+diff --git a/modules/tm/t_suspend.c b/modules/tm/t_suspend.c
+index 578d6b0..e6e2e35 100644
+--- a/modules/tm/t_suspend.c
++++ b/modules/tm/t_suspend.c
+@@ -210,9 +210,7 @@ int t_continue(unsigned int hash_index, unsigned int label,
+ 			branch < t->nr_of_outgoings;
+ 			branch++
+ 		) {
+-			if ((t->uac[branch].request.buffer != NULL)
+-				&& (t->uac[branch].last_received < 200)
+-			)
++			if (t->uac[branch].last_received < 200)
+ 				break;
+ 		}
+ 
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0023-modules_k-siptrace-Fixed-0-termination-for-tmp_pippo.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0023-modules_k-siptrace-Fixed-0-termination-for-tmp_pippo.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0023-modules_k-siptrace-Fixed-0-termination-for-tmp_pippo.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0023-modules_k-siptrace-Fixed-0-termination-for-tmp_pippo.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,34 @@
+From 78a67d3f69891b2a97d4db09d555c8896562c539 Mon Sep 17 00:00:00 2001
+From: Alexandr Dubovikov <alexandr.dubovikov at gmail.com>
+Date: Tue, 3 Apr 2012 13:10:37 +0200
+Subject: [PATCH] modules_k/siptrace: Fixed \0 termination for tmp_pipport. 
+ Thanks Michal Karas for the patch. (cherry picked from
+ commit d5fbc4ead58c7ef47aba91238c74f40f9162f78d)
+
+---
+ modules_k/siptrace/siptrace.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules_k/siptrace/siptrace.c b/modules_k/siptrace/siptrace.c
+index ccdf555..8c60b57 100644
+--- a/modules_k/siptrace/siptrace.c
++++ b/modules_k/siptrace/siptrace.c
+@@ -1636,13 +1636,13 @@ static int pipport2su (char *pipport, union sockaddr_union *tmp_su, unsigned int
+ 		return -1;
+ 	}
+ 	
+-	if((len = strlen(pipport)) > 256) {
++	if((len = strlen(pipport)) >= 256) {
+ 		LM_ERR("too big pipport\n");
+ 		goto error;
+ 	}
+ 
+ 	/* our tmp string */
+-        strncpy(tmp_piport, pipport, len);
++        strncpy(tmp_piport, pipport, len+1);
+ 
+ 	len = 0;
+ 
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0024-debugger-safe-wrapper-around-cfg-name.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0024-debugger-safe-wrapper-around-cfg-name.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0024-debugger-safe-wrapper-around-cfg-name.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0024-debugger-safe-wrapper-around-cfg-name.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,48 @@
+From b5b0b15dedf7781fa64dd17dda8f448678918621 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Mon, 16 Apr 2012 14:03:14 +0200
+Subject: [PATCH] debugger: safe wrapper around cfg name
+
+- some actions can be executed from inside the code, with no cfg file
+  name attached to it -- that makes debugger crash on solaris while
+  printing executed action details
+- reported by Nathaniel
+(cherry picked from commit 40ddcf88df9ef71bba7c182b7a1d76b559645628)
+---
+ modules/debugger/debugger_api.c |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/modules/debugger/debugger_api.c b/modules/debugger/debugger_api.c
+index 7fbfd0d..bbf31a0 100644
+--- a/modules/debugger/debugger_api.c
++++ b/modules/debugger/debugger_api.c
+@@ -252,7 +252,7 @@ int dbg_cfg_trace(void *data)
+ 			LOG_(_dbg_cfgtrace_facility, _dbg_cfgtrace_level,
+ 					_dbg_cfgtrace_prefix,
+ 					" c=[%s] l=%d a=%d n=%.*s\n",
+-					a->cfile, a->cline, a->type, an->len, an->s
++					ZSW(a->cfile), a->cline, a->type, an->len, ZSW(an->s)
+ 				);
+ 		}
+ 	}
+@@ -267,7 +267,7 @@ int dbg_cfg_trace(void *data)
+ 		LOG(_dbg_cfgtrace_level,
+ 					"breakpoint hit: p=[%u] c=[%s] l=%d a=%d n=%.*s\n",
+ 					_dbg_pid_list[process_no].pid,
+-					a->cfile, a->cline, a->type, an->len, an->s
++					ZSW(a->cfile), a->cline, a->type, an->len, ZSW(an->s)
+ 				);
+ 		_dbg_pid_list[process_no].in.cmd = DBG_CMD_NOP;
+ 		_dbg_pid_list[process_no].state = DBG_STATE_WAIT;
+@@ -295,7 +295,7 @@ int dbg_cfg_trace(void *data)
+ 				olen = snprintf(_dbg_pid_list[process_no].out.buf,
+ 						DBG_CMD_SIZE,
+ 						"exec [%s:%d] a=%d n=%.*s",
+-						a->cfile, a->cline, a->type, an->len, an->s);
++						ZSW(a->cfile), a->cline, a->type, an->len, ZSW(an->s));
+ 				if(olen<0)
+ 				{
+ 					_dbg_pid_list[process_no].out.cmd = DBG_CMD_ERR;
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0025-maxfwd-k-return-2-false-if-MF-header-cannot-be-proce.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0025-maxfwd-k-return-2-false-if-MF-header-cannot-be-proce.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0025-maxfwd-k-return-2-false-if-MF-header-cannot-be-proce.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0025-maxfwd-k-return-2-false-if-MF-header-cannot-be-proce.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,28 @@
+From f269211221b73cf89b88c6e76e46efddea589283 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Tue, 17 Apr 2012 22:40:06 +0200
+Subject: [PATCH] maxfwd(k): return -2 (false) if MF header cannot be
+ processed
+
+- reported by Ladislav Jurak, FS#214
+(cherry picked from commit a15428e688049e7ef49174a2e24cbf49eb7a7cad)
+---
+ modules_k/maxfwd/maxfwd.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/modules_k/maxfwd/maxfwd.c b/modules_k/maxfwd/maxfwd.c
+index 792949f..4e1735e 100644
+--- a/modules_k/maxfwd/maxfwd.c
++++ b/modules_k/maxfwd/maxfwd.c
+@@ -153,7 +153,7 @@ int process_maxfwd_header(struct sip_msg *msg, int limit)
+ 			return 2;
+ 		/* error */
+ 		case -2:
+-			break;
++			goto error;
+ 		/* found */
+ 		case 0:
+ 			return -1;
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0026-pua_reginfo-fix-for-state-of-the-registration-during.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0026-pua_reginfo-fix-for-state-of-the-registration-during.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0026-pua_reginfo-fix-for-state-of-the-registration-during.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0026-pua_reginfo-fix-for-state-of-the-registration-during.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,95 @@
+From 0f9f9c881cbc2c7834c4c4b101acbeda4f553903 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Tue, 17 Apr 2012 22:55:35 +0200
+Subject: [PATCH] pua_reginfo: fix for state of the registration during
+ unregister
+
+- when unregistering a single contact, the state of the registration may
+  be incorrectly reported .
+- fix of a small inefficiency of repeatedly  calling time(2) in the same function.
+- patch by Stefan Sayer, FS#213
+(cherry picked from commit c4be935b40b23b87b321fd604e761332bb07b8f8)
+---
+ modules_k/pua_reginfo/usrloc_cb.c |   30 ++++++++++++++++--------------
+ 1 files changed, 16 insertions(+), 14 deletions(-)
+
+diff --git a/modules_k/pua_reginfo/usrloc_cb.c b/modules_k/pua_reginfo/usrloc_cb.c
+index addeea9..92cf427 100644
+--- a/modules_k/pua_reginfo/usrloc_cb.c
++++ b/modules_k/pua_reginfo/usrloc_cb.c
+@@ -60,6 +60,8 @@ str* build_reginfo_full(urecord_t * record, str uri, ucontact_t* c, int type) {
+ 	ucontact_t * ptr;
+ 	char buf[512];
+ 	int buf_len;
++	int reg_active = 0;
++	time_t cur_time = time(0);
+ 
+ 	/* create the XML-Body */
+ 	doc = xmlNewDoc(BAD_CAST "1.0");
+@@ -94,18 +96,9 @@ str* build_reginfo_full(urecord_t * record, str uri, ucontact_t* c, int type) {
+ 	buf_len = snprintf(buf, sizeof(buf), "%p", record);
+ 	xmlNewProp(registration_node, BAD_CAST "id", BAD_CAST buf);
+ 
+-	/* look first for an un-expired and suported contact */
+-	ptr = record->contacts;
+-	while ((ptr) && !(VALID_CONTACT(ptr,time(0))))
+-		ptr = ptr->next;
+-	if (ptr==0)
+-		xmlNewProp(registration_node, BAD_CAST "state", BAD_CAST "terminated");
+-	else
+-		xmlNewProp(registration_node, BAD_CAST "state", BAD_CAST "active");
+-
+ 	ptr = record->contacts;
+ 	while (ptr) {
+-		if (VALID_CONTACT(ptr, time(0))) {
++		if (VALID_CONTACT(ptr, cur_time)) {
+ 			LM_DBG("Contact %.*s, %p\n", ptr->c.len, ptr->c.s, ptr);
+ 			/* Contact-Node */
+ 			contact_node =xmlNewChild(registration_node, NULL, BAD_CAST "contact", NULL) ;
+@@ -118,9 +111,10 @@ str* build_reginfo_full(urecord_t * record, str uri, ucontact_t* c, int type) {
+ 			xmlNewProp(contact_node, BAD_CAST "id", BAD_CAST buf);
+ 			/* Check, if this is the modified contact: */
+ 			if (ptr == c) {
+-				if ((type & UL_CONTACT_INSERT) || (type & UL_CONTACT_UPDATE))
++				if ((type & UL_CONTACT_INSERT) || (type & UL_CONTACT_UPDATE)) {
++					reg_active = 1;
+ 					xmlNewProp(contact_node, BAD_CAST "state", BAD_CAST "active");
+-				else 
++				} else
+ 					xmlNewProp(contact_node, BAD_CAST "state", BAD_CAST "terminated");
+ 				if (type & UL_CONTACT_INSERT) xmlNewProp(contact_node, BAD_CAST "event", BAD_CAST "created");
+ 				else if (type & UL_CONTACT_UPDATE) xmlNewProp(contact_node, BAD_CAST "event", BAD_CAST "refreshed");
+@@ -128,13 +122,14 @@ str* build_reginfo_full(urecord_t * record, str uri, ucontact_t* c, int type) {
+ 				else if (type & UL_CONTACT_DELETE) xmlNewProp(contact_node, BAD_CAST "event", BAD_CAST "unregistered");
+ 				else xmlNewProp(contact_node, BAD_CAST "event", BAD_CAST "unknown");
+ 				memset(buf, 0, sizeof(buf));
+-				buf_len = snprintf(buf, sizeof(buf), "%i", (int)(ptr->expires-time(0)));
++				buf_len = snprintf(buf, sizeof(buf), "%i", (int)(ptr->expires-cur_time));
+ 				xmlNewProp(contact_node, BAD_CAST "expires", BAD_CAST buf);
+ 			} else {
++				reg_active = 1;
+ 				xmlNewProp(contact_node, BAD_CAST "state", BAD_CAST "active");
+ 				xmlNewProp(contact_node, BAD_CAST "event", BAD_CAST "registered");
+ 				memset(buf, 0, sizeof(buf));
+-				buf_len = snprintf(buf, sizeof(buf), "%i", (int)(ptr->expires-time(0)));
++				buf_len = snprintf(buf, sizeof(buf), "%i", (int)(ptr->expires-cur_time));
+ 				xmlNewProp(contact_node, BAD_CAST "expires", BAD_CAST buf);
+ 			}
+ 			if (ptr->q != Q_UNSPECIFIED) {
+@@ -163,6 +158,13 @@ str* build_reginfo_full(urecord_t * record, str uri, ucontact_t* c, int type) {
+ 		ptr = ptr->next;
+ 	}
+ 
++	/* add registration state (at least one active contact): */
++	if (reg_active==0)
++		xmlNewProp(registration_node, BAD_CAST "state", BAD_CAST "terminated");
++	else
++		xmlNewProp(registration_node, BAD_CAST "state", BAD_CAST "active");
++
++
+ 	/* create the body */
+ 	body = (str*)pkg_malloc(sizeof(str));
+ 	if(body == NULL) {
+-- 
+1.7.5.4
+

Added: kamailio/trunk/debian/patches/upstream/0027-pua_reginfo-propoer-call-id-buffer-when-constructing.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0027-pua_reginfo-propoer-call-id-buffer-when-constructing.patch?rev=9647&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0027-pua_reginfo-propoer-call-id-buffer-when-constructing.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0027-pua_reginfo-propoer-call-id-buffer-when-constructing.patch Wed Apr 18 06:33:02 2012
@@ -1,0 +1,28 @@
+From 7c4be465dbb4c1accf04a803f919027a43095646 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Tue, 17 Apr 2012 23:00:50 +0200
+Subject: [PATCH] pua_reginfo: propoer call-id buffer when constructing XML
+ for reginfo
+
+- patch by Stefan Sayer, FS#212
+(cherry picked from commit db07a8e381990d835711e978a5bf711186495cdf)
+---
+ modules_k/pua_reginfo/usrloc_cb.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/modules_k/pua_reginfo/usrloc_cb.c b/modules_k/pua_reginfo/usrloc_cb.c
+index 92cf427..2374a65 100644
+--- a/modules_k/pua_reginfo/usrloc_cb.c
++++ b/modules_k/pua_reginfo/usrloc_cb.c
+@@ -141,7 +141,7 @@ str* build_reginfo_full(urecord_t * record, str uri, ucontact_t* c, int type) {
+ 			/* CallID Attribute */
+ 			memset(buf, 0, sizeof(buf));
+ 			buf_len = snprintf(buf, sizeof(buf), "%.*s", ptr->callid.len, ptr->callid.s);
+-			xmlNewProp(contact_node, BAD_CAST "callid", BAD_CAST ptr->callid.s);
++			xmlNewProp(contact_node, BAD_CAST "callid", BAD_CAST buf);
+ 			/* CSeq Attribute */
+ 			memset(buf, 0, sizeof(buf));
+ 			buf_len = snprintf(buf, sizeof(buf), "%d", ptr->cseq);
+-- 
+1.7.5.4
+




More information about the Pkg-voip-commits mailing list