[Freeswitch-svn] [commit] r12502 - in freeswitch/trunk: . src/mod/endpoints/mod_skypiax

FreeSWITCH SVN mikej at freeswitch.org
Sat Mar 7 01:33:39 PST 2009


Author: mikej
Date: Sat Mar  7 03:33:39 2009
New Revision: 12502

Log:
add skypiax to sln file and fix some warnings

Modified:
   freeswitch/trunk/Freeswitch.2008.sln
   freeswitch/trunk/src/mod/endpoints/mod_skypiax/   (props changed)
   freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c

Modified: freeswitch/trunk/Freeswitch.2008.sln
==============================================================================
--- freeswitch/trunk/Freeswitch.2008.sln	(original)
+++ freeswitch/trunk/Freeswitch.2008.sln	Sat Mar  7 03:33:39 2009
@@ -992,6 +992,11 @@
 		{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_skypiax", "src\mod\endpoints\mod_skypiax\mod_skypiax.2008.vcproj", "{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}"
+	ProjectSection(ProjectDependencies) = postProject
+		{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		All|Win32 = All|Win32
@@ -2396,6 +2401,13 @@
 		{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39}.Debug|x64.ActiveCfg = Debug|x64
 		{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39}.Release|Win32.ActiveCfg = Release|Win32
 		{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39}.Release|x64.ActiveCfg = Release|x64
+		{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.All|Win32.ActiveCfg = Release|Win32
+		{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.All|Win32.Build.0 = Release|Win32
+		{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.All|x64.ActiveCfg = Release|Win32
+		{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Debug|x64.ActiveCfg = Debug|Win32
+		{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Release|Win32.ActiveCfg = Release|Win32
+		{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Release|x64.ActiveCfg = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -2415,6 +2427,7 @@
 		{0DF3ABD0-DDC0-4265-B778-07C66780979B} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
 		{B3F424EC-3D8F-417C-B244-3919D5E1A577} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
 		{05C9FB27-480E-4D53-B3B7-6338E2526666} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
+		{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
 		{30A5B29C-983E-4580-9FD0-D647CCDCC7EB} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
 		{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
 		{C24FB505-05D7-4319-8485-7540B44C8603} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}

Modified: freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c	Sat Mar  7 03:33:39 2009
@@ -158,10 +158,10 @@
   private_t *tech_pvt = NULL;
 
   tech_pvt = switch_core_session_get_private(session);
-  assert(tech_pvt != NULL);
+  switch_assert(tech_pvt != NULL);
 
   channel = switch_core_session_get_channel(session);
-  assert(channel != NULL);
+  switch_assert(channel != NULL);
   switch_set_flag_locked(tech_pvt, TFLAG_IO);
 
   /* Move channel's state machine to ROUTING. This means the call is trying
@@ -184,10 +184,10 @@
   char msg_to_skype[256];
 
   channel = switch_core_session_get_channel(session);
-  assert(channel != NULL);
+  switch_assert(channel != NULL);
 
   tech_pvt = switch_core_session_get_private(session);
-  assert(tech_pvt != NULL);
+  switch_assert(tech_pvt != NULL);
 
   switch_clear_flag_locked(tech_pvt, TFLAG_IO);
   switch_clear_flag_locked(tech_pvt, TFLAG_VOICE);
@@ -226,10 +226,10 @@
   private_t *tech_pvt = NULL;
 
   channel = switch_core_session_get_channel(session);
-  assert(channel != NULL);
+  switch_assert(channel != NULL);
 
   tech_pvt = switch_core_session_get_private(session);
-  assert(tech_pvt != NULL);
+  switch_assert(tech_pvt != NULL);
 
   DEBUGA_SKYPE("%s CHANNEL ROUTING\n", SKYPIAX_P_LOG, switch_channel_get_name(channel));
 
@@ -243,10 +243,10 @@
   private_t *tech_pvt = NULL;
 
   channel = switch_core_session_get_channel(session);
-  assert(channel != NULL);
+  switch_assert(channel != NULL);
 
   tech_pvt = switch_core_session_get_private(session);
-  assert(tech_pvt != NULL);
+  switch_assert(tech_pvt != NULL);
 
   DEBUGA_SKYPE("%s CHANNEL EXECUTE\n", SKYPIAX_P_LOG, switch_channel_get_name(channel));
 
@@ -259,10 +259,10 @@
   private_t *tech_pvt = NULL;
 
   channel = switch_core_session_get_channel(session);
-  assert(channel != NULL);
+  switch_assert(channel != NULL);
 
   tech_pvt = switch_core_session_get_private(session);
-  assert(tech_pvt != NULL);
+  switch_assert(tech_pvt != NULL);
 
   switch (sig) {
   case SWITCH_SIG_KILL:
@@ -320,10 +320,10 @@
   switch_byte_t *data;
 
   channel = switch_core_session_get_channel(session);
-  assert(channel != NULL);
+  switch_assert(channel != NULL);
 
   tech_pvt = switch_core_session_get_private(session);
-  assert(tech_pvt != NULL);
+  switch_assert(tech_pvt != NULL);
   tech_pvt->read_frame.flags = SFF_NONE;
   *frame = NULL;
 
@@ -390,10 +390,10 @@
   unsigned int sent;
 
   channel = switch_core_session_get_channel(session);
-  assert(channel != NULL);
+  switch_assert(channel != NULL);
 
   tech_pvt = switch_core_session_get_private(session);
-  assert(tech_pvt != NULL);
+  switch_assert(tech_pvt != NULL);
 
   if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
     ERRORA("CIAPA \n", SKYPIAX_P_LOG);
@@ -424,10 +424,10 @@
   switch_channel_t *channel = NULL;
 
   channel = switch_core_session_get_channel(session);
-  assert(channel != NULL);
+  switch_assert(channel != NULL);
 
   tech_pvt = switch_core_session_get_private(session);
-  assert(tech_pvt != NULL);
+  switch_assert(tech_pvt != NULL);
 
   DEBUGA_SKYPE("ANSWERED! \n", SKYPIAX_P_LOG);
 
@@ -441,10 +441,10 @@
   private_t *tech_pvt;
 
   channel = switch_core_session_get_channel(session);
-  assert(channel != NULL);
+  switch_assert(channel != NULL);
 
   tech_pvt = (private_t *) switch_core_session_get_private(session);
-  assert(tech_pvt != NULL);
+  switch_assert(tech_pvt != NULL);
 
   switch (msg->message_id) {
   case SWITCH_MESSAGE_INDICATE_ANSWER:
@@ -521,11 +521,11 @@
       int found = 0;
       char interface_name[256];
 
-      if (strlen(outbound_profile->destination_number)) {
+      if (!switch_strlen_zero(outbound_profile->destination_number)) {
         int i;
         char *slash;
 
-        strncpy(interface_name, outbound_profile->destination_number, 255);
+        switch_copy_string(interface_name, outbound_profile->destination_number, 255);
         slash = strrchr(interface_name, '/');
         *slash = '\0';
 
@@ -657,12 +657,12 @@
         } else {
           DEBUGA_SKYPE("no session\n", SKYPIAX_P_LOG);
         }
-      } else {
+        tech_pvt->interface_state = SKYPIAX_STATE_DOWN;
+        memset(tech_pvt->session_uuid_str, '\0', sizeof(tech_pvt->session_uuid_str));
+	  } else {
         ERRORA("no tech_pvt?\n", SKYPIAX_P_LOG);
-      }
-      tech_pvt->interface_state = SKYPIAX_STATE_DOWN;
-      memset(tech_pvt->session_uuid_str, '\0', sizeof(tech_pvt->session_uuid_str));
-    }
+	  }
+	}
   }
   return NULL;
 }
@@ -1217,25 +1217,29 @@
   switch_core_session_t *session = NULL;
   switch_channel_t *channel = NULL;
 
-  if (strlen(tech_pvt->session_uuid_str)) {
+  if (!switch_strlen_zero(tech_pvt->session_uuid_str)) {
     session = switch_core_session_locate(tech_pvt->session_uuid_str);
   } else {
     ERRORA("No session???\n", SKYPIAX_P_LOG);
+	goto done;
   }
   if (session) {
     channel = switch_core_session_get_channel(session);
   } else {
     ERRORA("No session???\n", SKYPIAX_P_LOG);
+	goto done;
   }
   if (channel) {
     switch_channel_mark_ring_ready(channel);
     DEBUGA_SKYPE("skype_call: REMOTE PARTY RINGING\n", SKYPIAX_P_LOG);
   } else {
     ERRORA("No channel???\n", SKYPIAX_P_LOG);
+	goto done;
   }
 
   switch_core_session_rwunlock(session);
 
+done:
   return 0;
 }
 
@@ -1244,26 +1248,30 @@
   switch_core_session_t *session = NULL;
   switch_channel_t *channel = NULL;
 
-  if (strlen(tech_pvt->session_uuid_str)) {
+  if (!switch_strlen_zero(tech_pvt->session_uuid_str)) {
     session = switch_core_session_locate(tech_pvt->session_uuid_str);
   } else {
     ERRORA("No session???\n", SKYPIAX_P_LOG);
+	goto done;
   }
   if (session) {
     channel = switch_core_session_get_channel(session);
     switch_core_session_add_stream(session, NULL);
   } else {
     ERRORA("No session???\n", SKYPIAX_P_LOG);
+	goto done;
   }
   if (channel) {
     switch_channel_mark_pre_answered(channel);
     NOTICA("skype_call: REMOTE PARTY EARLY MEDIA\n", SKYPIAX_P_LOG);
   } else {
     ERRORA("No channel???\n", SKYPIAX_P_LOG);
+	goto done;
   }
 
   switch_core_session_rwunlock(session);
 
+done:
   return 0;
 }
 
@@ -1272,24 +1280,29 @@
   switch_core_session_t *session = NULL;
   switch_channel_t *channel = NULL;
 
-  if (strlen(tech_pvt->session_uuid_str)) {
+  if (!switch_strlen_zero(tech_pvt->session_uuid_str)) {
     session = switch_core_session_locate(tech_pvt->session_uuid_str);
   } else {
     ERRORA("No session???\n", SKYPIAX_P_LOG);
+	goto done;
   }
   if (session) {
     channel = switch_core_session_get_channel(session);
   } else {
     ERRORA("No session???\n", SKYPIAX_P_LOG);
+	goto done;
   }
   if (channel) {
     switch_channel_mark_answered(channel);
     //DEBUGA_SKYPE("skype_call: %s, answered\n", SKYPIAX_P_LOG, id);
   } else {
     ERRORA("No channel???\n", SKYPIAX_P_LOG);
+	goto done;
   }
 
   switch_core_session_rwunlock(session);
+
+done:
   DEBUGA_SKYPE("HERE!\n", SKYPIAX_P_LOG);
 
   return 0;



More information about the Freeswitch-svn mailing list