@joeygo commented on this pull request.


> +     s_port.len = rtpengine_dtmf_event_sock.s + 
> rtpengine_dtmf_event_sock.len - s_port.s;
+
+       if (s_port.len <= 0 || str2int(&s_port, &port) < 0 || port > 65535) {
+               LM_ERR("failed to initialize dtmf event listener because port 
is invalid %.*s\n", rtpengine_dtmf_event_sock.len, rtpengine_dtmf_event_sock.s);
+               return;
+       }
+       rtpengine_dtmf_event_sock.len -= s_port.len + 1;
+       trim(&rtpengine_dtmf_event_sock);
+       rtpengine_dtmf_event_sock.s[rtpengine_dtmf_event_sock.len] = '\0';
+
+       memset(&udp_addr, 0, sizeof(udp_addr));
+
+       if (rtpengine_dtmf_event_sock.s[0] == '[') {
+               udp_addr.sin6.sin6_family = AF_INET6;
+               udp_addr.sin6.sin6_port = htons(port);
+               ret = inet_pton(AF_INET, rtpengine_dtmf_event_sock.s, 
&udp_addr.sin6.sin6_addr);

Fixed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3473#discussion_r1226819073
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/3473/review/1475160...@github.com>
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to