Module: kamailio
Branch: master
Commit: 301302531c630803222e7f14a1c113b1a400f7a1
URL:
https://github.com/kamailio/kamailio/commit/301302531c630803222e7f14a1c113b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-08-04T15:21:17+02:00
evapi: use port in getaddrinfo() otherwise it does not bind as expected
- regression added by cc098ecdfb556bf5efaab72fa767c773000f9fb6
---
Modified: src/modules/evapi/evapi_dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/301302531c630803222e7f14a1c113b…
Patch:
https://github.com/kamailio/kamailio/commit/301302531c630803222e7f14a1c113b…
---
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;