[sr-dev] [kamailio/kamailio] extensions to lost and http_client modules (#2675)

Wolfgang Kampichler notifications at github.com
Wed Mar 31 21:36:29 CEST 2021


@wkampich commented on this pull request.



> +		/* send via connection */
+		curl = httpapi.http_connect(_m, &con, NULL, &res, mtheld, &que);
+	} else {
+		/* we have no connection ... do a NAPTR lookup */
+		if(lost_parse_host(did.s, &host, &flag) > 0) {
+
+			LM_DBG("no conn. trying NATPR lookup [%.*s]\n", host.len, host.s);
+
+			/* remove '[' and ']' from string (IPv6) */
+			if(flag == AF_INET6) {
+				host.s++;
+				host.len = host.len - 2;
+			}
+			/* is it a name or ip ... check nameinfo (reverse lookup) */
+			len = 0;
+			ipstr = lost_copy_string(host, &len);

the `inet_..()` function called in a next step requires a zero terminated string

-- 
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/2675#discussion_r605168228
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210331/c33bce10/attachment.htm>


More information about the sr-dev mailing list