mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-15 13:14:03 +00:00
format
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5925 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
511a6292af
commit
b099f96e4e
@ -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
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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",
|
||||||
|
@ -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);
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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);
|
||||||
|
@ -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,
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user