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:
Kevin P. Fleming
2006-06-09 20:40:10 +00:00
parent b31b0be819
commit 8d88bf549d
10 changed files with 67 additions and 69 deletions

View File

@@ -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);

View File

@@ -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)

View File

@@ -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 };