*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
- * Copyright 2002 The FreeRADIUS server project
+ * Copyright 2002,2006 The FreeRADIUS server project
* Copyright 2002 Alan DeKok <aland@ox.org>
*/
-#include "autoconf.h"
-#include "libradius.h"
+#include <freeradius-devel/ident.h>
+RCSID("$Id$")
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "radiusd.h"
-#include "modules.h"
-#include "conffile.h"
-
-static const char rcsid[] = "$Id$";
+#include <freeradius-devel/radiusd.h>
+#include <freeradius-devel/modules.h>
/*
* Define a structure for our module configuration.
static int get_number(REQUEST *request, const char **string, int *answer)
{
int i, found;
- uint32_t result, x;
+ uint32_t result;
+ int x;
const char *p;
expr_token_t this;
inst->xlat_name = strdup(xlat_name);
xlat_register(xlat_name, expr_xlat, inst);
}
+ /*
+ * Initialize various paircompare functions
+ */
+ pair_builtincompare_init();
*instance = inst;
return 0;
rlm_expr_t *inst = instance;
xlat_unregister(inst->xlat_name, expr_xlat);
+ pair_builtincompare_detach();
free(inst->xlat_name);
free(inst);
* is single-threaded.
*/
module_t rlm_expr = {
+ RLM_MODULE_INIT,
"expr", /* Name */
RLM_TYPE_THREAD_SAFE, /* type */
- NULL, /* initialization */
expr_instantiate, /* instantiation */
+ expr_detach, /* detach */
{
NULL, /* authentication */
NULL, /* authorization */
NULL, /* pre-accounting */
NULL /* accounting */
},
- expr_detach, /* detach */
- NULL, /* destroy */
};