update dependency information to match new names for dependencies
[asterisk/asterisk.git] / cdr / cdr_radius.c
index 1da21ed..8fe6d44 100644 (file)
  */
 
 /*** MODULEINFO
-       <depend>radiusclient</depend>
+       <depend>radius</depend>
  ***/
 
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Rev$")
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
 #include <radiusclient-ng.h>
 
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Rev$")
-
 #include "asterisk/channel.h"
 #include "asterisk/cdr.h"
 #include "asterisk/module.h"
 #include "asterisk/logger.h"
 #include "asterisk/utils.h"
+#include "asterisk/options.h"
 
 /*! ISO 8601 standard format */
 #define DATE_FORMAT "%Y-%m-%d %T %z"
@@ -87,7 +88,7 @@ static char *desc = "RADIUS CDR Backend";
 static char *name = "radius";
 static char *cdr_config = "cdr.conf";
 
-static char radiuscfg[AST_CONFIG_MAX_PATH] = "/etc/radiusclient-ng/radiusclient.conf";
+static char radiuscfg[PATH_MAX] = "/etc/radiusclient-ng/radiusclient.conf";
 
 static struct ast_flags global_flags = { RADIUS_FLAG_USEGMTIME | RADIUS_FLAG_LOGUNIQUEID | RADIUS_FLAG_LOGUSERFIELD };
 
@@ -216,7 +217,8 @@ static int radius_log(struct ast_cdr *cdr)
        VALUE_PAIR *send = NULL;
 
        if (build_radius_record(&send, cdr)) {
-               ast_log(LOG_WARNING, "Unable to create RADIUS record. CDR not recorded!\n");
+               if (option_debug)
+                       ast_log(LOG_DEBUG, "Unable to create RADIUS record. CDR not recorded!\n");
                return result;
        }