[Freeswitch-svn] [commit] r10677 - freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax

FreeSWITCH SVN gmaruzz at freeswitch.org
Tue Dec 9 06:35:38 PST 2008


Author: gmaruzz
Date: Tue Dec  9 09:35:38 2008
New Revision: 10677

Log:
skypiax: indent -gnu -ts4 -br -brs -cdw -lp -ce -nbfda -npcs -nprs -npsl -nbbo -saf -sai -saw -cs -bbo -nhnl -nut -sob -l90

Modified:
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax.h
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c	Tue Dec  9 09:35:38 2008
@@ -36,7 +36,6 @@
 /*************************************************/
 /*************************************************/
 
-
 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,
@@ -63,7 +62,6 @@
                                            int stream_id);
 static switch_status_t channel_kill_channel(switch_core_session_t * session, int sig);
 
-
 static switch_status_t skypiax_codec(private_t * tech_pvt, int sample_rate, int codec_ms)
 {
   if (switch_core_codec_init
@@ -93,7 +91,8 @@
 
 }
 
-void skypiax_tech_init(private_t * tech_pvt, switch_core_session_t * session, skypiax_interface_t * p)
+void skypiax_tech_init(private_t * tech_pvt, switch_core_session_t * session,
+                       skypiax_interface_t * p)
 {
 
   DEBUGA_PBX("ENTERING FUNC\n", SKYPIAX_P_LOG);
@@ -539,7 +538,7 @@
 {
   struct skypiax_interface *p = obj;
   int res;
-  int forever=1;
+  int forever = 1;
 
   DEBUGA_PBX("ENTERING FUNC\n", SKYPIAX_P_LOG);
 
@@ -575,7 +574,6 @@
 
 }
 
-
 static switch_status_t load_config(void)
 {
   char *cf = "skypiax.conf";
@@ -733,10 +731,10 @@
       }
       if (interface_id && interface_id < SKYPIAX_MAX_INTERFACES) {
         struct skypiax_interface newconf;
-          switch_thread_t *do_skype_thread_thread;
-          switch_threadattr_t *do_skype_thd_attr = NULL;
-          switch_thread_t *skypiax_do_controldev_thread_thread;
-          switch_threadattr_t *skypiax_do_controldev_thread_thd_attr = NULL;
+        switch_thread_t *do_skype_thread_thread;
+        switch_threadattr_t *do_skype_thd_attr = NULL;
+        switch_thread_t *skypiax_do_controldev_thread_thread;
+        switch_threadattr_t *skypiax_do_controldev_thread_thd_attr = NULL;
 
         memset(&newconf, '\0', sizeof(newconf));
         SKYPIAX_INTERFACES[interface_id] = newconf;
@@ -766,20 +764,23 @@
         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO,
                           "STARTING interface_id=%d\n", interface_id);
 
-
-          switch_threadattr_create(&do_skype_thd_attr, skypiax_module_pool);
-          switch_threadattr_detach_set(do_skype_thd_attr, 1);
-          switch_threadattr_stacksize_set(do_skype_thd_attr, SWITCH_THREAD_STACKSIZE);
-          switch_thread_create(&do_skype_thread_thread, do_skype_thd_attr, do_skype_thread,
-                               &SKYPIAX_INTERFACES[interface_id], skypiax_module_pool);
+        switch_threadattr_create(&do_skype_thd_attr, skypiax_module_pool);
+        switch_threadattr_detach_set(do_skype_thd_attr, 1);
+        switch_threadattr_stacksize_set(do_skype_thd_attr, SWITCH_THREAD_STACKSIZE);
+        switch_thread_create(&do_skype_thread_thread, do_skype_thd_attr, do_skype_thread,
+                             &SKYPIAX_INTERFACES[interface_id], skypiax_module_pool);
 
         switch_sleep(100000);
 
-          switch_threadattr_create(&skypiax_do_controldev_thread_thd_attr, skypiax_module_pool);
-          switch_threadattr_detach_set(skypiax_do_controldev_thread_thd_attr, 1);
-          switch_threadattr_stacksize_set(skypiax_do_controldev_thread_thd_attr, SWITCH_THREAD_STACKSIZE);
-          switch_thread_create(&skypiax_do_controldev_thread_thread, skypiax_do_controldev_thread_thd_attr, skypiax_do_controldev_thread,
-                               &SKYPIAX_INTERFACES[interface_id], skypiax_module_pool);
+        switch_threadattr_create(&skypiax_do_controldev_thread_thd_attr,
+                                 skypiax_module_pool);
+        switch_threadattr_detach_set(skypiax_do_controldev_thread_thd_attr, 1);
+        switch_threadattr_stacksize_set(skypiax_do_controldev_thread_thd_attr,
+                                        SWITCH_THREAD_STACKSIZE);
+        switch_thread_create(&skypiax_do_controldev_thread_thread,
+                             skypiax_do_controldev_thread_thd_attr,
+                             skypiax_do_controldev_thread,
+                             &SKYPIAX_INTERFACES[interface_id], skypiax_module_pool);
 
         switch_sleep(1000000);
 
@@ -832,7 +833,7 @@
   memset(&globals, '\0', sizeof(globals));
   memset(SKYPIAX_INTERFACES, '\0', sizeof(SKYPIAX_INTERFACES));
 
-#ifndef WIN32               //FIXME
+#ifndef WIN32                   //FIXME
   if (!XInitThreads()) {
     ERRORA("Not initialized XInitThreads!\n", SKYPIAX_P_LOG);
   } else {
@@ -850,7 +851,7 @@
   skypiax_endpoint_interface->io_routines = &skypiax_io_routines;
   skypiax_endpoint_interface->state_handler = &skypiax_state_handlers;
 
-    DEBUGA_SKYPE("EXITING FUNC!\n", SKYPIAX_P_LOG);
+  DEBUGA_SKYPE("EXITING FUNC!\n", SKYPIAX_P_LOG);
   /* indicate that the module should continue to be loaded */
   return SWITCH_STATUS_SUCCESS;
 }
@@ -934,4 +935,3 @@
  * For VIM:
  * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
  */
-

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax.h
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax.h	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax.h	Tue Dec  9 09:35:38 2008
@@ -44,7 +44,6 @@
 //FIXME include?
 #endif //WIN32
 
-
 #define SKYPIAX_SVN_VERSION "SVN 123456"
 
 typedef enum {
@@ -63,7 +62,6 @@
   GFLAG_MY_CODEC_PREFS = (1 << 0)
 } GFLAGS;
 
-
 #define DEBUGA_SKYPE(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, 		"rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_SKYPE  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
 #define DEBUGA_CALL(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, 		"rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_CALL  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
 #define DEBUGA_PBX(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, 		"rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_PBX  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
@@ -209,9 +207,9 @@
 
 typedef struct private_object private_t;
 
-
 void *SWITCH_THREAD_FUNC do_skype_thread(switch_thread_t * thread, void *obj);
-void skypiax_tech_init(private_t * tech_pvt, switch_core_session_t * session, skypiax_interface_t * p);
+void skypiax_tech_init(private_t * tech_pvt, switch_core_session_t * session,
+                       skypiax_interface_t * p);
 switch_status_t skypiax_skypeaudio_read(private_t * tech_pvt);
 int skypiax_skypeaudio_init(struct skypiax_interface *p);
 int skypiax_skype_write(struct skypiax_interface *p, char *msg_to_skype);

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	Tue Dec  9 09:35:38 2008
@@ -303,7 +303,9 @@
 
   switch_status_t rv;
 
-  rv = switch_file_pipe_create_ex(&p->audiopipe[0], &p->audiopipe[1], 2, skypiax_module_pool);
+  rv =
+    switch_file_pipe_create_ex(&p->audiopipe[0], &p->audiopipe[1], 2,
+                               skypiax_module_pool);
   rv = switch_file_pipe_timeout_set(p->audiopipe[0], 100000);
 
 /* the pipe is our audio fd for pbx to poll on */
@@ -318,6 +320,7 @@
   }
   return 0;
 }
+
 switch_status_t skypiax_skypeaudio_read(private_t * tech_pvt)
 {
   struct skypiax_interface *p;
@@ -862,7 +865,6 @@
 }
 #endif // WIN32
 
-
 int skypiax_skype_write(struct skypiax_interface *p, char *msg_to_skype)
 {
 #ifdef WIN32
@@ -963,8 +965,8 @@
       if (read_from_pipe[i] == '\0') {
 
         //if (option_debug > 101)
-          DEBUGA_SKYPE("read_skype: howmany=%d, i=%d, a=%d, |||%s||| \n", SKYPIAX_P_LOG,
-                       howmany, i, a, messaggio);
+        DEBUGA_SKYPE("read_skype: howmany=%d, i=%d, a=%d, |||%s||| \n", SKYPIAX_P_LOG,
+                     howmany, i, a, messaggio);
 
         if (!strncasecmp(messaggio, "ERROR 92 CALL", 12)) {
           ERRORA("Skype got ERROR: |||%s|||, the number we called was not recognized\n",
@@ -1092,8 +1094,8 @@
             if (channel) {
               switch_dtmf_t dtmf =
                 { (char) value[0], switch_core_default_dtmf_duration(0) };
-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%c DTMF %s\n",
-                                  dtmf.digit, switch_channel_get_name(channel));
+              switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%c DTMF %s\n",
+                                dtmf.digit, switch_channel_get_name(channel));
               switch_mutex_lock(tech_pvt->flag_mutex);
               switch_channel_queue_dtmf(channel, &dtmf);
               switch_set_flag(tech_pvt, TFLAG_DTMF);
@@ -1123,7 +1125,7 @@
               if (p->interface_state != SKYPIAX_STATE_DIALING) {
                 /* we are not calling out */
 
-                if (1) { //FIXME
+                if (1) {        //FIXME
                   /* we are not inside an active call */
                   p->skype_callflow = CALLFLOW_STATUS_RINGING;
                   p->interface_state = SKYPIAX_STATE_RING;
@@ -1260,10 +1262,10 @@
                 DEBUGA_SKYPE("skype_call: %s SKYPIAX_CONTROL_ANSWER sent\n",
                              SKYPIAX_P_LOG, id);
 
-              if (1) { //FIXME
+              if (1) {          //FIXME
                 char msg_to_skype[1024];
 
-                if (1) { //FIXME
+                if (1) {        //FIXME
                   switch_threadattr_t *thd_attr = NULL;
 
                   switch_threadattr_create(&thd_attr, skypiax_module_pool);
@@ -1380,5 +1382,3 @@
   //DEBUGA_PBX("EXITING FUNC\n", SKYPIAX_P_LOG);
   return 0;
 }
-
-



More information about the Freeswitch-svn mailing list