[sr-dev] [kamailio/kamailio] nathelper : added new function set_alias_to_avp (#2124)

Yasin CANER notifications at github.com
Sun Nov 10 08:56:40 CET 2019


ycaner06 commented on this pull request.



> +	if(memchr_pointer == NULL) {
+		LM_ERR("No alias param found for port\n");
+		return ;
+	} else {
+		port.len = memchr_pointer - port.s;
+		i=i+port.len;
+	}
+
+	//last char is proto 0,1,2,3,4..7
+	proto.s= &port.s[port.len+1];
+	proto_type_int_to_str(atoi(proto.s), &proto);
+
+	LM_DBG("Host [%.*s][port: %.*s][proto: %.*s] \r\n",host.len,host.s,port.len,port.s,proto.len,proto.s);
+
+	//sip:host:port;transport=udp
+	alias_uri->s =(char *) pkg_malloc(port.len+host.len+proto.len+16);

i looked some examples in codes for pv->setf and i dont think that it should be freed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2124#discussion_r344477296
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20191109/316369ad/attachment.html>


More information about the sr-dev mailing list