Module: kamailio
Branch: master
Commit: 8aae606809be6160dd48708788051bf7a4a6bc42
URL:
https://github.com/kamailio/kamailio/commit/8aae606809be6160dd48708788051bf…
Author: Victor Seva <vseva(a)sipwise.com>
Committer: Victor Seva <vseva(a)sipwise.com>
Date: 2016-05-10T08:12:17+02:00
core: support radius radcli lib
---
Modified: Makefile.radius
Modified: lib/kcore/radius.h
---
Diff:
https://github.com/kamailio/kamailio/commit/8aae606809be6160dd48708788051bf…
Patch:
https://github.com/kamailio/kamailio/commit/8aae606809be6160dd48708788051bf…
---
diff --git a/Makefile.radius b/Makefile.radius
index ddbc4af..ac20070 100644
--- a/Makefile.radius
+++ b/Makefile.radius
@@ -28,7 +28,13 @@ DEFS+= -DUSE_FREERADIUS
RADIUSCLIENT_LIB=freeradius-client
else
+ifeq ($(RADCLI),1)
+# - radcli library
+DEFS+= -DUSE_RADCLI
+RADIUSCLIENT_LIB=radcli
+
+else
# - radiusclient-ng v5 or v4 library
ifneq ($(radiusclient_ng), 4)
@@ -42,6 +48,7 @@ DEFS+=-DRADIUSCLIENT_NG_4
RADIUSCLIENT_LIB=radiusclient
endif
+endif
endif
diff --git a/lib/kcore/radius.h b/lib/kcore/radius.h
index 58896af..a7a03e4 100644
--- a/lib/kcore/radius.h
+++ b/lib/kcore/radius.h
@@ -32,9 +32,14 @@
#define _RADIUS_CORE_H
#ifndef USE_FREERADIUS
- #include <radiusclient-ng.h>
- #define DEFAULT_RADIUSCLIENT_CONF \
- "/usr/local/etc/radiusclient-ng/radiusclient.conf"
+ #ifdef USE_RADCLI
+ #include <radcli/radcli.h>
+ #define DEFAULT_RADIUSCLIENT_CONF ""
+ #else
+ #include <radiusclient-ng.h>
+ #define DEFAULT_RADIUSCLIENT_CONF \
+ "/usr/local/etc/radiusclient-ng/radiusclient.conf"
+ #endif
#else
#include <freeradius-client.h>
#define DEFAULT_RADIUSCLIENT_CONF ""