Module: kamailio
Branch: 4.4
Commit: 956d7f29bb99dec6d6dbc0fff2f5df72d38679fc
URL:
https://github.com/kamailio/kamailio/commit/956d7f29bb99dec6d6dbc0fff2f5df7…
Author: Victor Seva <vseva(a)sipwise.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2016-05-10T10:13:34+02:00
core: support radius radcli lib
(cherry picked from commit 8aae606809be6160dd48708788051bf7a4a6bc42)
---
Modified: Makefile.radius
Modified: lib/kcore/radius.h
---
Diff:
https://github.com/kamailio/kamailio/commit/956d7f29bb99dec6d6dbc0fff2f5df7…
Patch:
https://github.com/kamailio/kamailio/commit/956d7f29bb99dec6d6dbc0fff2f5df7…
---
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 ""