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

FreeSWITCH SVN gmaruzz at freeswitch.org
Mon Jan 12 09:30:42 PST 2009


Author: gmaruzz
Date: Mon Jan 12 11:30:42 2009
New Revision: 11139

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	Mon Jan 12 11:30:42 2009
@@ -59,7 +59,7 @@
 
 static switch_status_t skypiax_codec(private_t * tech_pvt, int sample_rate, int codec_ms)
 {
-switch_core_session_t *session=NULL;
+  switch_core_session_t *session = NULL;
 
   if (switch_core_codec_init
       (&tech_pvt->read_codec, "L16", NULL, sample_rate, codec_ms, 1,
@@ -103,7 +103,8 @@
   switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED,
                     switch_core_session_get_pool(session));
   switch_core_session_set_private(session, tech_pvt);
-  switch_copy_string(tech_pvt->session_uuid_str, switch_core_session_get_uuid(session), sizeof(tech_pvt->session_uuid_str));
+  switch_copy_string(tech_pvt->session_uuid_str, switch_core_session_get_uuid(session),
+                     sizeof(tech_pvt->session_uuid_str));
   if (skypiax_codec(tech_pvt, SAMPLERATE_SKYPIAX, 20) != SWITCH_STATUS_SUCCESS) {
     ERRORA("skypiax_codec FAILED\n", SKYPIAX_P_LOG);
   } else {
@@ -583,7 +584,7 @@
       DEBUGA_SKYPE("skype call ended\n", SKYPIAX_P_LOG);
 
       if (tech_pvt) {
-	session = switch_core_session_locate(tech_pvt->session_uuid_str);
+        session = switch_core_session_locate(tech_pvt->session_uuid_str);
 
         if (session) {
           channel = switch_core_session_get_channel(session);
@@ -814,7 +815,8 @@
                           skype_user);
         switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].context, context);
         switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].dialplan, dialplan);
-        switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].destination, destination);
+        switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].destination,
+                          destination);
         switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].context, context);
 
         DEBUGA_SKYPE
@@ -849,8 +851,7 @@
            globals.SKYPIAX_INTERFACES[interface_id].destination);
         DEBUGA_SKYPE
           ("interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].context=%s\n",
-           SKYPIAX_P_LOG, interface_id,
-           globals.SKYPIAX_INTERFACES[interface_id].context);
+           SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].context);
         NOTICA("STARTING interface_id=%d\n", SKYPIAX_P_LOG, interface_id);
 
         switch_threadattr_create(&skypiax_skypeapi_thread_attr, skypiax_module_pool);
@@ -902,10 +903,10 @@
                      i, globals.SKYPIAX_INTERFACES[i].context);
         DEBUGA_SKYPE("i=%d globals.SKYPIAX_INTERFACES[%d].dialplan=%s\n", SKYPIAX_P_LOG,
                      i, i, globals.SKYPIAX_INTERFACES[i].dialplan);
-        DEBUGA_SKYPE("i=%d globals.SKYPIAX_INTERFACES[%d].destination=%s\n", SKYPIAX_P_LOG,
-                     i, i, globals.SKYPIAX_INTERFACES[i].destination);
-        DEBUGA_SKYPE("i=%d globals.SKYPIAX_INTERFACES[%d].context=%s\n", SKYPIAX_P_LOG,
-                     i, i, globals.SKYPIAX_INTERFACES[i].context);
+        DEBUGA_SKYPE("i=%d globals.SKYPIAX_INTERFACES[%d].destination=%s\n",
+                     SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].destination);
+        DEBUGA_SKYPE("i=%d globals.SKYPIAX_INTERFACES[%d].context=%s\n", SKYPIAX_P_LOG, i,
+                     i, globals.SKYPIAX_INTERFACES[i].context);
       }
     }
   }

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	Mon Jan 12 11:30:42 2009
@@ -157,7 +157,7 @@
   switch_codec_t write_codec;
   switch_frame_t read_frame;
   unsigned char databuf[SWITCH_RECOMMENDED_BUFFER_SIZE];
-  char 	session_uuid_str[SWITCH_UUID_FORMATTED_LENGTH+1];
+  char session_uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
   switch_caller_profile_t *caller_profile;
   switch_mutex_t *mutex;
   switch_mutex_t *flag_mutex;

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	Mon Jan 12 11:30:42 2009
@@ -506,7 +506,7 @@
     //ERRORA("tech_pvt->audiopipe[1] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[1]);
     if (samples != SAMPLES_PER_FRAME * sizeof(short)) {
       //if (samples)
-        //ERRORA("SRV PIPE READ=====> NOT GOOD samples=%u expected=%lu\n", SKYPIAX_P_LOG, samples, SAMPLES_PER_FRAME * sizeof(short));
+      //ERRORA("SRV PIPE READ=====> NOT GOOD samples=%u expected=%lu\n", SKYPIAX_P_LOG, samples, SAMPLES_PER_FRAME * sizeof(short));
       assert(samples == SAMPLES_PER_FRAME * sizeof(short)); //do a crash, please
       //do nothing
     } else {
@@ -808,8 +808,6 @@
   return (xerror != BadValue) && (xerror != BadWindow);
 }
 
-
-
 int skypiax_skype_send_message(struct SkypiaxHandles *SkypiaxHandles,
                                const char *message_P)
 {
@@ -1353,7 +1351,7 @@
 
               DEBUGA_SKYPE("Call %s received a DTMF: %s\n", SKYPIAX_P_LOG, id, value);
 
-	      session = switch_core_session_locate(tech_pvt->session_uuid_str);
+              session = switch_core_session_locate(tech_pvt->session_uuid_str);
               channel = switch_core_session_get_channel(session);
 
               if (channel) {
@@ -1565,7 +1563,7 @@
 
                 //FIXME *new_session=switch_loadable_module_create_interface(skypiax_endpoint_interface, pool);
 
-                if (!strlen(tech_pvt->session_uuid_str)) {   
+                if (!strlen(tech_pvt->session_uuid_str)) {
                   switch_core_session_t *session = NULL;
                   //private_t *tech_pvt = NULL;
                   switch_channel_t *channel = NULL;
@@ -1596,9 +1594,9 @@
                          switch_caller_profile_new(switch_core_session_get_pool(session),
                                                    "skypiax", tech_pvt->dialplan,
                                                    tech_pvt->callid_name,
-                                                   tech_pvt->callid_number, NULL,
-                                                   NULL, NULL, NULL,
-                                                   "mod_skypiax", tech_pvt->context,
+                                                   tech_pvt->callid_number, NULL, NULL,
+                                                   NULL, NULL, "mod_skypiax",
+                                                   tech_pvt->context,
                                                    tech_pvt->destination)) != 0) {
                       char name[128];
                       //switch_snprintf(name, sizeof(name), "skypiax/%s/%s", tech_pvt->name, tech_pvt->caller_profile->destination_number);
@@ -1620,7 +1618,7 @@
                   switch_channel_t *channel = NULL;
 
                   if (strlen(tech_pvt->session_uuid_str)) {
-		    session = switch_core_session_locate(tech_pvt->session_uuid_str);
+                    session = switch_core_session_locate(tech_pvt->session_uuid_str);
                   } else {
                     ERRORA("No session???\n", SKYPIAX_P_LOG);
                   }
@@ -1713,7 +1711,8 @@
     }
     return -1;
   }
-  switch_copy_string(tech_pvt->session_uuid_str, switch_core_session_get_uuid(session), sizeof(tech_pvt->session_uuid_str));
+  switch_copy_string(tech_pvt->session_uuid_str, switch_core_session_get_uuid(session),
+                     sizeof(tech_pvt->session_uuid_str));
   caller_profile = tech_pvt->caller_profile;
   caller_profile->destination_number = rdest;
 



More information about the Freeswitch-svn mailing list