mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
there is no reason to define our own 'maximum path length' when the POSIX headers already define one for us
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -261,7 +261,7 @@ static int build_csv_record(char *buf, size_t bufsize, struct ast_cdr *cdr)
|
||||
|
||||
static int writefile(char *s, char *acc)
|
||||
{
|
||||
char tmp[AST_CONFIG_MAX_PATH];
|
||||
char tmp[PATH_MAX];
|
||||
FILE *f;
|
||||
if (strchr(acc, '/') || (acc[0] == '.')) {
|
||||
ast_log(LOG_WARNING, "Account code '%s' insecure for writing file\n", acc);
|
||||
@@ -282,7 +282,7 @@ static int csv_log(struct ast_cdr *cdr)
|
||||
{
|
||||
/* Make sure we have a big enough buf */
|
||||
char buf[1024];
|
||||
char csvmaster[AST_CONFIG_MAX_PATH];
|
||||
char csvmaster[PATH_MAX];
|
||||
snprintf(csvmaster, sizeof(csvmaster),"%s/%s/%s", ast_config_AST_LOG_DIR, CSV_LOG_DIR, CSV_MASTER);
|
||||
#if 0
|
||||
printf("[CDR] %s ('%s' -> '%s') Dur: %ds Bill: %ds Disp: %s Flags: %s Account: [%s]\n", cdr->channel, cdr->src, cdr->dst, cdr->duration, cdr->billsec, ast_cdr_disp2str(cdr->disposition), ast_cdr_flags2str(cdr->amaflags), cdr->accountcode);
|
||||
|
@@ -63,7 +63,7 @@ static char *name = "cdr-custom";
|
||||
|
||||
static FILE *mf = NULL;
|
||||
|
||||
static char master[AST_CONFIG_MAX_PATH];
|
||||
static char master[PATH_MAX];
|
||||
static char format[1024]="";
|
||||
|
||||
static int load_config(int reload)
|
||||
|
@@ -88,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 };
|
||||
|
||||
|
Reference in New Issue
Block a user