[Freeswitch-svn] [commit] r5925 - in freeswitch/trunk/src: include mod/dialplans/mod_dialplan_directory mod/endpoints/mod_alsa mod/endpoints/mod_dingaling mod/endpoints/mod_iax mod/endpoints/mod_portaudio mod/event_handlers/mod_event_multicast mod/event_handlers/mod_event_socket mod/loggers/mod_syslog mod/xml_int/mod_xml_rpc

Freeswitch SVN anthm at freeswitch.org
Wed Oct 17 10:59:17 EDT 2007


Author: anthm
Date: Wed Oct 17 10:59:17 2007
New Revision: 5925

Modified:
   freeswitch/trunk/src/include/switch_utils.h
   freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c
   freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c
   freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
   freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
   freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
   freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
   freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
   freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c
   freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c

Log:
format

Modified: freeswitch/trunk/src/include/switch_utils.h
==============================================================================
--- freeswitch/trunk/src/include/switch_utils.h	(original)
+++ freeswitch/trunk/src/include/switch_utils.h	Wed Oct 17 10:59:17 2007
@@ -286,7 +286,7 @@
   \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;\
-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

Modified: freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c
==============================================================================
--- freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c	(original)
+++ freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c	Wed Oct 17 10:59:17 2007
@@ -45,13 +45,13 @@
 	char *base;
 } globals;
 
-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_dn, globals.dn)
-	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_directory_name, globals.directory_name);
+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_pass, globals.pass);
+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_base, globals.base);
 
-	 static void load_config(void)
+static void load_config(void)
 {
 	char *cf = "dialplan_directory.conf";
 	switch_xml_t cfg, xml, settings, param;
@@ -138,7 +138,7 @@
 			}
 		}
 	}
-  out:
+ out:
 
 	switch_core_directory_close(&dh);
 

Modified: freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c	Wed Oct 17 10:59:17 2007
@@ -130,13 +130,13 @@
 #define PA_SLAVE 0
 
 
-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_num, globals.cid_num)//;
-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_timer_name, globals.timer_name)//;
-SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_device_name, globals.device_name)//;
+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_num, globals.cid_num);
+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_timer_name, globals.timer_name);
+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_device_name, globals.device_name);
 
 #define is_master(t) switch_test_flag(t, TFLAG_MASTER)
 static void add_pvt(private_t * tech_pvt, int master);

Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	Wed Oct 17 10:59:17 2007
@@ -191,9 +191,9 @@
 };
 
 
-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_rates_string, globals.codec_rates_string)
+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_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_logout(const char *profile_name, switch_core_session_t *session, switch_stream_handle_t *stream);

Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c	Wed Oct 17 10:59:17 2007
@@ -101,22 +101,22 @@
 typedef struct private_object private_t;
 
 
-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_rates_string, globals.codec_rates_string)
-	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",
-		 "IAX_EVENT_DTMF", "IAX_EVENT_TIMEOUT", "IAX_EVENT_LAGRQ", "IAX_EVENT_LAGRP", "IAX_EVENT_RINGA",
-		 "IAX_EVENT_PING", "IAX_EVENT_PONG", "IAX_EVENT_BUSY", "IAX_EVENT_ANSWER", "IAX_EVENT_IMAGE",
-		 "IAX_EVENT_AUTHRQ", "IAX_EVENT_AUTHRP", "IAX_EVENT_REGREQ", "IAX_EVENT_REGACK",
-		 "IAX_EVENT_URL", "IAX_EVENT_LDCOMPLETE", "IAX_EVENT_TRANSFER", "IAX_EVENT_DPREQ",
-		 "IAX_EVENT_DPREP", "IAX_EVENT_DIAL", "IAX_EVENT_QUELCH", "IAX_EVENT_UNQUELCH",
-		 "IAX_EVENT_UNLINK", "IAX_EVENT_LINKREJECT", "IAX_EVENT_TEXT", "IAX_EVENT_REGREJ",
-		 "IAX_EVENT_LINKURL", "IAX_EVENT_CNG", "IAX_EVENT_REREQUEST", "IAX_EVENT_TXREPLY",
-		 "IAX_EVENT_TXREJECT", "IAX_EVENT_TXACCEPT", "IAX_EVENT_TXREADY"
-	 };
+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_rates_string, globals.codec_rates_string);
+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",
+							"IAX_EVENT_DTMF", "IAX_EVENT_TIMEOUT", "IAX_EVENT_LAGRQ", "IAX_EVENT_LAGRP", "IAX_EVENT_RINGA",
+							"IAX_EVENT_PING", "IAX_EVENT_PONG", "IAX_EVENT_BUSY", "IAX_EVENT_ANSWER", "IAX_EVENT_IMAGE",
+							"IAX_EVENT_AUTHRQ", "IAX_EVENT_AUTHRP", "IAX_EVENT_REGREQ", "IAX_EVENT_REGACK",
+							"IAX_EVENT_URL", "IAX_EVENT_LDCOMPLETE", "IAX_EVENT_TRANSFER", "IAX_EVENT_DPREQ",
+							"IAX_EVENT_DPREP", "IAX_EVENT_DIAL", "IAX_EVENT_QUELCH", "IAX_EVENT_UNQUELCH",
+							"IAX_EVENT_UNLINK", "IAX_EVENT_LINKREJECT", "IAX_EVENT_TEXT", "IAX_EVENT_REGREJ",
+							"IAX_EVENT_LINKURL", "IAX_EVENT_CNG", "IAX_EVENT_REREQUEST", "IAX_EVENT_TXREPLY",
+							"IAX_EVENT_TXREJECT", "IAX_EVENT_TXACCEPT", "IAX_EVENT_TXREADY"
+};
 
 
 struct ast_iana {
@@ -127,24 +127,24 @@
 
 //999 means it's wrong nad i dont know the real one 
 static struct ast_iana AST_IANA[] = { {AST_FORMAT_G723_1, 4, "g723.1"},
-{AST_FORMAT_GSM, 3, "gsm"},
-{AST_FORMAT_ULAW, 0, "ulaw"},
-{AST_FORMAT_ALAW, 8, "alaw"},
-{AST_FORMAT_G726, 999, "g726"},
-{AST_FORMAT_ADPCM, 999, "adpcm"},
-{AST_FORMAT_SLINEAR, 10, "slinear"},
-{AST_FORMAT_LPC10, 7, "lpc10"},
-{AST_FORMAT_G729A, 18, "g729"},
-{AST_FORMAT_SPEEX, 97, "speex"},
-{AST_FORMAT_SPEEX, 98, "speex"},
-{AST_FORMAT_ILBC, 102, "ilbc"},
-{AST_FORMAT_MAX_AUDIO, 999, ""},
-{AST_FORMAT_JPEG, 999, ""},
-{AST_FORMAT_PNG, 999, ""},
-{AST_FORMAT_H261, 999, ""},
-{AST_FORMAT_H263, 999, ""},
-{AST_FORMAT_MAX_VIDEO, 999, ""},
-{0, 0}
+									  {AST_FORMAT_GSM, 3, "gsm"},
+									  {AST_FORMAT_ULAW, 0, "ulaw"},
+									  {AST_FORMAT_ALAW, 8, "alaw"},
+									  {AST_FORMAT_G726, 999, "g726"},
+									  {AST_FORMAT_ADPCM, 999, "adpcm"},
+									  {AST_FORMAT_SLINEAR, 10, "slinear"},
+									  {AST_FORMAT_LPC10, 7, "lpc10"},
+									  {AST_FORMAT_G729A, 18, "g729"},
+									  {AST_FORMAT_SPEEX, 97, "speex"},
+									  {AST_FORMAT_SPEEX, 98, "speex"},
+									  {AST_FORMAT_ILBC, 102, "ilbc"},
+									  {AST_FORMAT_MAX_AUDIO, 999, ""},
+									  {AST_FORMAT_JPEG, 999, ""},
+									  {AST_FORMAT_PNG, 999, ""},
+									  {AST_FORMAT_H261, 999, ""},
+									  {AST_FORMAT_H263, 999, ""},
+									  {AST_FORMAT_MAX_VIDEO, 999, ""},
+									  {0, 0}
 };
 
 static char *ast2str(int ast)
@@ -449,9 +449,9 @@
 }
 
 /* 
-State methods they get called when the state changes to the specific state 
-returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
-so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
+   State methods they get called when the state changes to the specific state 
+   returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
+   so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
 */
 static switch_status_t channel_on_init(switch_core_session_t *session)
 {
@@ -695,7 +695,7 @@
 
 	return SWITCH_STATUS_FALSE;
 
-  cng:
+ cng:
 	data = (switch_byte_t *) tech_pvt->read_frame.data;
 	data[0] = 65;
 	data[1] = 0;
@@ -784,7 +784,7 @@
 }
 
 /* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
-that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
+   that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
 */
 static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
 													switch_caller_profile_t *outbound_profile,

Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c	Wed Oct 17 10:59:17 2007
@@ -128,41 +128,42 @@
 #define PA_SLAVE 0
 
 
-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_num, globals.cid_num)
-	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_timer_name, globals.timer_name)
+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_num, globals.cid_num);
+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_timer_name, globals.timer_name);
 #define is_master(t) switch_test_flag(t, TFLAG_MASTER)
-	 static void add_pvt(private_t * tech_pvt, int master);
-	 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_hangup(switch_core_session_t *session);
-	 static switch_status_t channel_on_ring(switch_core_session_t *session);
-	 static switch_status_t channel_on_loopback(switch_core_session_t *session);
-	 static switch_status_t channel_on_transmit(switch_core_session_t *session);
-	 static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
-														 switch_caller_profile_t *outbound_profile,
-														 switch_core_session_t **new_session, switch_memory_pool_t **pool);
-	 static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
-	 static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
-	 static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
-	 static switch_status_t engage_device(int samplerate, int codec_ms);
-	 static switch_status_t engage_ring_device(int sample_rate, int channels);
-	 static void deactivate_ring_device(void);
-	 static int dump_info(void);
-	 static switch_status_t load_config(void);
-	 static int get_dev_by_name(char *name, int in);
-	 static int get_dev_by_number(int number, int in);
-	 static switch_status_t pa_cmd(const char *dest, switch_core_session_t *session, switch_stream_handle_t *stream);
+
+static void add_pvt(private_t * tech_pvt, int master);
+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_hangup(switch_core_session_t *session);
+static switch_status_t channel_on_ring(switch_core_session_t *session);
+static switch_status_t channel_on_loopback(switch_core_session_t *session);
+static switch_status_t channel_on_transmit(switch_core_session_t *session);
+static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
+													switch_caller_profile_t *outbound_profile,
+													switch_core_session_t **new_session, switch_memory_pool_t **pool);
+static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
+static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
+static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
+static switch_status_t engage_device(int samplerate, int codec_ms);
+static switch_status_t engage_ring_device(int sample_rate, int channels);
+static void deactivate_ring_device(void);
+static int dump_info(void);
+static switch_status_t load_config(void);
+static int get_dev_by_name(char *name, int in);
+static int get_dev_by_number(int number, int in);
+static switch_status_t pa_cmd(const char *dest, switch_core_session_t *session, switch_stream_handle_t *stream);
 
 /* 
    State methods they get called when the state changes to the specific state 
    returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
    so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
 */
-	 static switch_status_t channel_on_init(switch_core_session_t *session)
+static switch_status_t channel_on_init(switch_core_session_t *session)
 {
 	switch_channel_t *channel;
 	private_t *tech_pvt = NULL;
@@ -583,12 +584,12 @@
 
 			goto hold;
 		}
-	  cng:
+	cng:
 		switch_yield(globals.read_codec.implementation->microseconds_per_frame);
 		*frame = &globals.cng_frame;
 		return SWITCH_STATUS_SUCCESS;
 
-	  hold:
+	hold:
 
 		{
 			switch_size_t olen = globals.read_codec.implementation->samples_per_frame;
@@ -1040,7 +1041,7 @@
 	int i, printCount, cr = 7;
 	PaError err;
 	static double standardSampleRates[] = { 8000.0, 9600.0, 11025.0, 12000.0, 16000.0, 22050.0, 24000.0, 32000.0,
-		44100.0, 48000.0, 88200.0, 96000.0, 192000.0, -1
+											44100.0, 48000.0, 88200.0, 96000.0, 192000.0, -1
 	};
 
 	printCount = cr;
@@ -1184,7 +1185,7 @@
 
 	return 0;
 
-  error:
+ error:
 	switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "An error occured while using the portaudio stream\n");
 	switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "Error number: %d\n", err);
 	switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "Error message: %s\n", Pa_GetErrorText(err));
@@ -1370,7 +1371,7 @@
 		stream->write_function(stream, "NO SUCH CALL\n");
 	}
 
-  done:
+ done:
 	switch_mutex_unlock(globals.pvt_lock);
 
 	return SWITCH_STATUS_SUCCESS;
@@ -1436,7 +1437,7 @@
 			break;
 		}
 	}
-  done:
+ done:
 	switch_mutex_unlock(globals.pvt_lock);
 
 	stream->write_function(stream, "Answered %d channels.\n", x);
@@ -1490,7 +1491,7 @@
 		goto bad;
 	}
 
-  desc:
+ desc:
 	x = 0;
 	stream->write_function(stream, "FLAGS: ");
 	if (switch_test_flag((&globals), GFLAG_EAR)) {
@@ -1507,9 +1508,9 @@
 
 	goto done;
 
-  bad:
+ bad:
 	stream->write_function(stream, "Usage: flags [on|off] <flags>\n");
-  done:
+ done:
 	return SWITCH_STATUS_SUCCESS;
 }
 
@@ -1796,7 +1797,7 @@
 		}
 	}
 
-  done:
+ done:
 
 	if (http) {
 

Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c	Wed Oct 17 10:59:17 2007
@@ -53,10 +53,10 @@
 	int running;
 } globals;
 
-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_address, globals.address);
+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_bindings, globals.bindings);
 #define MULTICAST_EVENT "multicast::event"
-	 static switch_status_t load_config(void)
+static switch_status_t load_config(void)
 {
 	switch_status_t status = SWITCH_STATUS_SUCCESS;
 	char *cf = "event_multicast.conf";

Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	Wed Oct 17 10:59:17 2007
@@ -91,13 +91,13 @@
 	int threads;
 } prefs;
 
-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_ip, prefs.ip);
+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 launch_listener_thread(listener_t * listener);
+static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t * thread, void *obj);
+static void launch_listener_thread(listener_t * listener);
 
-	 static switch_status_t socket_logger(const switch_log_node_t *node, switch_log_level_t level)
+static switch_status_t socket_logger(const switch_log_node_t *node, switch_log_level_t level)
 {
 	listener_t *l;
 
@@ -565,7 +565,7 @@
 		switch_thread_rwlock_unlock(acs->listener->rwlock);
 	}
 
-  done:
+ done:
 	if (acs && acs->bg) {
 		switch_memory_pool_t *pool = acs->pool;
 		acs = NULL;
@@ -875,7 +875,7 @@
 					}
 				}
 
-			  end:
+			end:
 				cur = next;
 			}
 		}
@@ -964,7 +964,7 @@
 		}
 	}
 
-  done:
+ done:
 	if (event) {
 		switch_event_destroy(&event);
 	}
@@ -1102,7 +1102,7 @@
 
 	}
 
-  done:
+ done:
 
 	remove_listener(listener);
 
@@ -1225,7 +1225,7 @@
 			goto sock_fail;
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Socket up listening on %s:%u\n", prefs.ip, prefs.port);
 		break;
-	  sock_fail:
+	sock_fail:
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Error!\n");
 		switch_yield(100000);
 	}
@@ -1284,7 +1284,7 @@
 		switch_core_destroy_memory_pool(&listener_pool);
 	}
 
-  fail:
+ fail:
 	return SWITCH_STATUS_TERM;
 }
 

Modified: freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c
==============================================================================
--- freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c	(original)
+++ freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c	Wed Oct 17 10:59:17 2007
@@ -52,23 +52,23 @@
 	char *format;
 } globals;
 
-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_format, globals.format)
-	SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_facility, globals.facility)
-
-	 static switch_loadable_module_interface_t console_module_interface = {
-		 /*.module_name */ modname,
-		 /*.endpoint_interface */ NULL,
-		 /*.timer_interface */ NULL,
-		 /*.dialplan_interface */ NULL,
-		 /*.codec_interface */ NULL,
-		 /*.application_interface */ NULL,
-		 /*.api_interface */ NULL,
-		 /*.file_interface */ NULL,
-		 /*.speech_interface */ NULL,
-		 /*.directory_interface */ NULL
-	 };
+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_format, globals.format);
+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_facility, globals.facility);
+
+static switch_loadable_module_interface_t console_module_interface = {
+    /*.module_name */ modname,
+    /*.endpoint_interface */ NULL,
+    /*.timer_interface */ NULL,
+    /*.dialplan_interface */ NULL,
+    /*.codec_interface */ NULL,
+    /*.application_interface */ NULL,
+    /*.api_interface */ NULL,
+    /*.file_interface */ NULL,
+    /*.speech_interface */ NULL,
+    /*.directory_interface */ NULL
+};
 
 static switch_status_t mod_syslog_logger(const switch_log_node_t *node, switch_log_level_t level)
 {

Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c	(original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c	Wed Oct 17 10:59:17 2007
@@ -55,11 +55,11 @@
 	char *pass;
 } globals;
 
-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_pass, globals.pass)
+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_pass, globals.pass);
 
- static switch_status_t do_config(void)
+static switch_status_t do_config(void)
 {
 	char *cf = "xml_rpc.conf";
 	switch_xml_t cfg, xml, settings, param;
@@ -292,7 +292,7 @@
 		val = xmlrpc_build_value(envP, "s", "ERROR!");
 	}
 
-done:
+ done:
 	/* xmlrpc-c requires us to free memory it malloced from xmlrpc_decompose_value */
 	switch_safe_free(command);
 	switch_safe_free(arg);
@@ -347,7 +347,7 @@
 	/* Return our result. */
 	val = xmlrpc_build_value(envP, "s", buf);
 
-done:
+ done:
 	/* xmlrpc-c requires us to free memory it malloced from xmlrpc_decompose_value */
 	switch_safe_free(oid);
 	switch_safe_free(s_action);



More information about the Freeswitch-svn mailing list