Module: kamailio
Branch: 5.4
Commit: a24d6c421fac3487f45a352955ba1a2d3e3cf2b7
URL:
https://github.com/kamailio/kamailio/commit/a24d6c421fac3487f45a352955ba1a2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-08-04T15:21:52+02:00
evapi: use port in getaddrinfo() otherwise it does not bind as expected
- regression added by cc098ecdfb556bf5efaab72fa767c773000f9fb6
(cherry picked from commit 301302531c630803222e7f14a1c113b1a400f7a1)
---
Modified: src/modules/evapi/evapi_dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a24d6c421fac3487f45a352955ba1a2…
Patch:
https://github.com/kamailio/kamailio/commit/a24d6c421fac3487f45a352955ba1a2…
---
diff --git a/src/modules/evapi/evapi_dispatch.c b/src/modules/evapi/evapi_dispatch.c
index 0f95291bad..1b8bff4402 100644
--- a/src/modules/evapi/evapi_dispatch.c
+++ b/src/modules/evapi/evapi_dispatch.c
@@ -650,7 +650,7 @@ int evapi_run_dispatcher(char *laddr, int lport)
memset(&ai_hints, 0, sizeof(struct addrinfo));
ai_hints.ai_family = AF_UNSPEC; /* allow IPv4 or IPv6 */
ai_hints.ai_socktype = SOCK_STREAM; /* stream socket */
- ai_ret = getaddrinfo(laddr, NULL, &ai_hints, &ai_res);
+ ai_ret = getaddrinfo(laddr, int2str(lport, NULL), &ai_hints, &ai_res);
if (ai_ret != 0) {
LM_ERR("getaddrinfo failed: %d %s\n", ai_ret, gai_strerror(ai_ret));
return -1;