Module: sip-router
Branch: master
Commit: 2934e46a18d9cfba05e657bc1dbbaa559a31b103
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2934e46…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Oct 1 23:03:32 2013 +0200
registrar: fix compile warning after previous patch
---
modules/registrar/save.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/registrar/save.c b/modules/registrar/save.c
index cbc28c4..5cc4627 100644
--- a/modules/registrar/save.c
+++ b/modules/registrar/save.c
@@ -144,7 +144,7 @@ static struct socket_info *get_sock_val(struct sip_msg *msg)
str hosts;
int port;
int proto;
- char c;
+ char c = 0;
if(sock_hdr_name.len>0) {
if (parse_headers( msg, HDR_EOH_F, 0) == -1) {
@@ -185,7 +185,7 @@ static struct socket_info *get_sock_val(struct sip_msg *msg)
socks.len, socks.s);
return 0;
}
- if(sock_hdr_name.len>0) {
+ if(sock_hdr_name.len>0 && c!=0) {
socks.s[socks.len] = c;
}
sock = grep_sock_info(&hosts,(unsigned short)port,(unsigned short)proto);