so that paths and filename are writable by asterisk.c without
causing segfaults.

This involves defining the variables as const char *,
and having them point to as static, writable buffer
defined in asterisk.c

On passing, fix some errors in using these variables
in some files in utils/ , and in res/snmp/agent.c
which was redefining a variable without using paths.h

(not applicable to 1.4)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Luigi Rizzo
2007-12-20 09:55:05 +00:00
parent c848e480c9
commit 5e24835995
6 changed files with 114 additions and 94 deletions

View File

@@ -51,6 +51,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "asterisk/paths.h" /* need ast_config_AST_SOCKET */
#include "asterisk/channel.h"
#include "asterisk/logger.h"
#include "asterisk/options.h"
@@ -71,9 +72,6 @@ int header_simple_table(struct variable *, oid *, size_t *, int, size_t *, Write
int register_sysORTable(oid *, size_t, const char *);
int unregister_sysORTable(oid *, size_t);
/* Not defined in header files */
extern char ast_config_AST_SOCKET[];
/* Forward declaration */
static void init_asterisk_mib(void);