[asterisk-commits] kharwell: branch 12 r406803 - in /branches/12: ./ cdr/ cel/ include/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 28 17:17:14 CST 2014
Author: kharwell
Date: Tue Jan 28 17:17:12 2014
New Revision: 406803
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=406803
Log:
cdr_radius, cel_radius: build agains libfreeradius-client
Asterisk's RADIUS module currently build against libradiusclient-ng, but this
project has been superseeded by libfreeradius-client. The API is 99% compatible
except that the header name has changed, the library name has changed, and
the configuration file location has changed.
(closes issue ASTERISK-22980)
Reported by: Jeremy Lainé
Patches:
freeradius-client.patch uploaded by sharky (license 6561)
........
Merged revisions 406801 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 406802 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
branches/12/ (props changed)
branches/12/cdr/cdr_radius.c
branches/12/cel/cel_radius.c
branches/12/configure
branches/12/configure.ac
branches/12/include/asterisk/autoconfig.h.in
Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: branches/12/cdr/cdr_radius.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/cdr/cdr_radius.c?view=diff&rev=406803&r1=406802&r2=406803
==============================================================================
--- branches/12/cdr/cdr_radius.c (original)
+++ branches/12/cdr/cdr_radius.c Tue Jan 28 17:17:12 2014
@@ -41,7 +41,11 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#ifdef FREERADIUS_CLIENT
+#include <freeradius-client.h>
+#else
#include <radiusclient-ng.h>
+#endif
#include "asterisk/channel.h"
#include "asterisk/cdr.h"
@@ -87,7 +91,11 @@
static const char name[] = "radius";
static const char cdr_config[] = "cdr.conf";
+#ifdef FREERADIUS_CLIENT
+static char radiuscfg[PATH_MAX] = "/etc/radiusclient/radiusclient.conf";
+#else
static char radiuscfg[PATH_MAX] = "/etc/radiusclient-ng/radiusclient.conf";
+#endif
static struct ast_flags global_flags = { RADIUS_FLAG_USEGMTIME | RADIUS_FLAG_LOGUNIQUEID | RADIUS_FLAG_LOGUSERFIELD };
Modified: branches/12/cel/cel_radius.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/cel/cel_radius.c?view=diff&rev=406803&r1=406802&r2=406803
==============================================================================
--- branches/12/cel/cel_radius.c (original)
+++ branches/12/cel/cel_radius.c Tue Jan 28 17:17:12 2014
@@ -35,7 +35,11 @@
ASTERISK_FILE_VERSION(__FILE__, "$Rev$")
+#ifdef FREERADIUS_CLIENT
+#include <freeradius-client.h>
+#else
#include <radiusclient-ng.h>
+#endif
#include "asterisk/channel.h"
#include "asterisk/cel.h"
@@ -79,7 +83,11 @@
static char *cel_config = "cel.conf";
+#ifdef FREERADIUS_CLIENT
+static char radiuscfg[PATH_MAX] = "/etc/radiusclient/radiusclient.conf";
+#else
static char radiuscfg[PATH_MAX] = "/etc/radiusclient-ng/radiusclient.conf";
+#endif
static struct ast_flags global_flags = { RADIUS_FLAG_USEGMTIME | RADIUS_FLAG_LOGUNIQUEID | RADIUS_FLAG_LOGUSERFIELD };
Modified: branches/12/configure.ac
URL: http://svnview.digium.com/svn/asterisk/branches/12/configure.ac?view=diff&rev=406803&r1=406802&r2=406803
==============================================================================
--- branches/12/configure.ac (original)
+++ branches/12/configure.ac Tue Jan 28 17:17:12 2014
@@ -2134,7 +2134,14 @@
# Some distributions (like SuSE) remove the 5.1 suffix.
AST_EXT_LIB_CHECK([LUA], [lua], [luaL_openlib], [lua.h], [-lm])
-AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])
+# Accept either RADIUS client library, their APIs are fully compatible,
+# just different header filenames and different SONAMEs
+AST_EXT_LIB_CHECK([RADIUS], [freeradius-client], [rc_read_config], [freeradius-client.h])
+if test "x${PBX_RADIUS}" = "x1"; then
+ AC_DEFINE(FREERADIUS_CLIENT, [], [Use the FreeRADIUS-client library])
+else
+ AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])
+fi
AST_EXT_LIB_CHECK([COROSYNC], [cpg], [cpg_join], [corosync/cpg.h], [-lcfg])
AST_EXT_LIB_CHECK([COROSYNC_CFG_STATE_TRACK], [cfg], [corosync_cfg_state_track], [corosync/cfg.h], [-lcfg])
Modified: branches/12/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/branches/12/include/asterisk/autoconfig.h.in?view=diff&rev=406803&r1=406802&r2=406803
==============================================================================
--- branches/12/include/asterisk/autoconfig.h.in (original)
+++ branches/12/include/asterisk/autoconfig.h.in Tue Jan 28 17:17:12 2014
@@ -28,6 +28,9 @@
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
+
+/* Use the FreeRADIUS-client library */
+#undef FREERADIUS_CLIENT
/* Define to 1 if anonymous semaphores work. */
#undef HAS_WORKING_SEMAPHORE
More information about the asterisk-commits
mailing list