git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5925 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-10-17 14:59:17 +00:00
parent 511a6292af
commit b099f96e4e
10 changed files with 130 additions and 129 deletions

View File

@ -286,7 +286,7 @@ SWITCH_DECLARE(switch_time_t) switch_str_time(const char *in);
\param vname the name of the global pointer to modify with the new function \param vname the name of the global pointer to modify with the new function
*/ */
#define SWITCH_DECLARE_GLOBAL_STRING_FUNC(fname, vname) static void fname(char *string) { if (!string) return;\ #define SWITCH_DECLARE_GLOBAL_STRING_FUNC(fname, vname) static void fname(char *string) { if (!string) return;\
if (vname) {free(vname); vname = NULL;}vname = strdup(string);} if (vname) {free(vname); vname = NULL;}vname = strdup(string);} static void fname(char *string)
/*! /*!
\brief Separate a string into an array based on a character delimeter \brief Separate a string into an array based on a character delimeter

View File

@ -45,11 +45,11 @@ static struct {
char *base; char *base;
} globals; } globals;
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_directory_name, globals.directory_name) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_directory_name, globals.directory_name);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_host, globals.host) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_host, globals.host);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dn, globals.dn) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dn, globals.dn);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_pass, globals.pass) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_pass, globals.pass);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_base, globals.base) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_base, globals.base);
static void load_config(void) static void load_config(void)
{ {

View File

@ -130,13 +130,13 @@ static struct {
#define PA_SLAVE 0 #define PA_SLAVE 0
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)//; SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_name, globals.cid_name)//; SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_name, globals.cid_name);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_num, globals.cid_num)//; SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_num, globals.cid_num);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ring_file, globals.ring_file)//; SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ring_file, globals.ring_file);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_hold_file, globals.hold_file)//; SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_hold_file, globals.hold_file);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_timer_name, globals.timer_name)//; SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_timer_name, globals.timer_name);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_device_name, globals.device_name)//; SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_device_name, globals.device_name);
#define is_master(t) switch_test_flag(t, TFLAG_MASTER) #define is_master(t) switch_test_flag(t, TFLAG_MASTER)
static void add_pvt(private_t * tech_pvt, int master); static void add_pvt(private_t * tech_pvt, int master);

View File

@ -191,9 +191,9 @@ struct rfc2833_digit {
}; };
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_string, globals.codec_string) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_string, globals.codec_string);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_rates_string, globals.codec_rates_string) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_rates_string, globals.codec_rates_string);
static switch_status_t dl_login(const char *arg, switch_core_session_t *session, switch_stream_handle_t *stream); static switch_status_t dl_login(const char *arg, switch_core_session_t *session, switch_stream_handle_t *stream);
static switch_status_t dl_logout(const char *profile_name, switch_core_session_t *session, switch_stream_handle_t *stream); static switch_status_t dl_logout(const char *profile_name, switch_core_session_t *session, switch_stream_handle_t *stream);

View File

@ -101,10 +101,10 @@ struct private_object {
typedef struct private_object private_t; typedef struct private_object private_t;
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_string, globals.codec_string) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_string, globals.codec_string);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_rates_string, globals.codec_rates_string) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_rates_string, globals.codec_rates_string);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ip, globals.ip) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ip, globals.ip);
static char *IAXNAMES[] = { "IAX_EVENT_CONNECT", "IAX_EVENT_ACCEPT", "IAX_EVENT_HANGUP", "IAX_EVENT_REJECT", "IAX_EVENT_VOICE", static char *IAXNAMES[] = { "IAX_EVENT_CONNECT", "IAX_EVENT_ACCEPT", "IAX_EVENT_HANGUP", "IAX_EVENT_REJECT", "IAX_EVENT_VOICE",

View File

@ -128,13 +128,14 @@ static struct {
#define PA_SLAVE 0 #define PA_SLAVE 0
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_name, globals.cid_name) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_name, globals.cid_name);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_num, globals.cid_num) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_num, globals.cid_num);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ring_file, globals.ring_file) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ring_file, globals.ring_file);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_hold_file, globals.hold_file) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_hold_file, globals.hold_file);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_timer_name, globals.timer_name) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_timer_name, globals.timer_name);
#define is_master(t) switch_test_flag(t, TFLAG_MASTER) #define is_master(t) switch_test_flag(t, TFLAG_MASTER)
static void add_pvt(private_t * tech_pvt, int master); static void add_pvt(private_t * tech_pvt, int master);
static void remove_pvt(private_t * tech_pvt); static void remove_pvt(private_t * tech_pvt);
static switch_status_t channel_on_init(switch_core_session_t *session); static switch_status_t channel_on_init(switch_core_session_t *session);

View File

@ -53,8 +53,8 @@ static struct {
int running; int running;
} globals; } globals;
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_address, globals.address) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_address, globals.address);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_bindings, globals.bindings) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_bindings, globals.bindings);
#define MULTICAST_EVENT "multicast::event" #define MULTICAST_EVENT "multicast::event"
static switch_status_t load_config(void) static switch_status_t load_config(void)
{ {

View File

@ -91,8 +91,8 @@ static struct {
int threads; int threads;
} prefs; } prefs;
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_pref_ip, prefs.ip) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_pref_ip, prefs.ip);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_pref_pass, prefs.password) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_pref_pass, prefs.password);
static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t * thread, void *obj); static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t * thread, void *obj);
static void launch_listener_thread(listener_t * listener); static void launch_listener_thread(listener_t * listener);

View File

@ -52,10 +52,10 @@ static struct {
char *format; char *format;
} globals; } globals;
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ident, globals.ident) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ident, globals.ident);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_level, globals.level) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_level, globals.level);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_format, globals.format) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_format, globals.format);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_facility, globals.facility) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_facility, globals.facility);
static switch_loadable_module_interface_t console_module_interface = { static switch_loadable_module_interface_t console_module_interface = {
/*.module_name */ modname, /*.module_name */ modname,

View File

@ -55,9 +55,9 @@ static struct {
char *pass; char *pass;
} globals; } globals;
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_realm, globals.realm) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_realm, globals.realm);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_user, globals.user) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_user, globals.user);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_pass, globals.pass) SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_pass, globals.pass);
static switch_status_t do_config(void) static switch_status_t do_config(void)
{ {