Module: sip-router
Branch: master
Commit: 321cbd8a3657e1ae455d01fe8dbd2f6354204f60
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=321cbd8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Apr 6 14:09:30 2012 +0200
msrp: init dst info struct before parsing uri
---
modules/msrp/msrp_netio.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/msrp/msrp_netio.c b/modules/msrp/msrp_netio.c
index c566b31..e636df3 100644
--- a/modules/msrp/msrp_netio.c
+++ b/modules/msrp/msrp_netio.c
@@ -262,6 +262,8 @@ struct dest_info *msrp_uri_to_dstinfo(struct dns_srv_handle* dns_h,
union sockaddr_union to;
int err;
+ init_dest_info(dst);
+
if (msrp_parse_uri(uri->s, uri->len, &parsed_uri) < 0) {
LM_ERR("bad msrp uri: %.*s\n", uri->len, uri->s );
return 0;
@@ -273,7 +275,6 @@ struct dest_info *msrp_uri_to_dstinfo(struct dns_srv_handle* dns_h,
dst->proto = PROTO_TCP;
}
- init_dest_info(dst);
dst->send_flags=sflags;
host=&parsed_uri.host;
port = parsed_uri.port_no;