Module: kamailio
Branch: master
Commit: 81687628bc5fb90a6b126cd2b89c8725a4c3caab
URL:
https://github.com/kamailio/kamailio/commit/81687628bc5fb90a6b126cd2b89c872…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-12-21T17:07:15+01:00
evapi: detect the OS darwin as substring
- adjust condition to suit analyzer
---
Modified: src/modules/evapi/Makefile
Modified: src/modules/evapi/evapi_dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/81687628bc5fb90a6b126cd2b89c872…
Patch:
https://github.com/kamailio/kamailio/commit/81687628bc5fb90a6b126cd2b89c872…
---
diff --git a/src/modules/evapi/Makefile b/src/modules/evapi/Makefile
index fa3e3fe515..7df0976d9b 100644
--- a/src/modules/evapi/Makefile
+++ b/src/modules/evapi/Makefile
@@ -8,9 +8,9 @@ NAME=evapi.so
ifeq ($(CROSS_COMPILE),)
BUILDER = $(shell which pkg-config)
ifneq ($(BUILDER),)
- PKGLIBUV = $(shell $(BUILDER) --exists libev > /dev/null 2>&1 ; echo $$? )
+ PKGLIBUV = $(shell $(BUILDER) --exists libev > /dev/null 2>&1 ; echo $$? )
ifneq ($(PKGLIBUV),0)
- BUILDER =
+ BUILDER =
endif
endif
endif
@@ -19,13 +19,14 @@ ifneq ($(BUILDER),)
DEFS += $(shell $(BUILDER) --cflags libev)
LIBS += $(shell $(BUILDER) --libs libev)
else
-ifeq ($(OS), darwin)
- DEFS += -I/opt/local/include
- LIBS += -L/opt/local/lib
-endif
+ifneq (,$(findstring darwin,$(OS)))
+ DEFS += -I/opt/local/include -I$(LOCALBASE)/include
+ LIBS += -L/opt/local/lib -L$(LOCALBASE)/lib -lev
+else
DEFS += -I$(LOCALBASE)/include -I$(SYSBASE)/include
LIBS += -L$(LOCALBASE)/lib -L$(SYSBASE)/lib -lev
endif
+endif
DEFS+=-DKAMAILIO_MOD_INTERFACE
diff --git a/src/modules/evapi/evapi_dispatch.c b/src/modules/evapi/evapi_dispatch.c
index 34e733c885..fee0cc8c27 100644
--- a/src/modules/evapi/evapi_dispatch.c
+++ b/src/modules/evapi/evapi_dispatch.c
@@ -552,7 +552,7 @@ void evapi_accept_client(struct ev_loop *loop, struct ev_io *watcher,
int revent
break;
}
}
- if(i==EVAPI_MAX_CLIENTS) {
+ if(i>=EVAPI_MAX_CLIENTS) {
LM_ERR("too many clients\n");
close(csock);
free(evapi_client);