add skypiax to sln file and fix some warnings

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12502 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2009-03-07 09:33:39 +00:00
parent 8ef50d84dd
commit 47933a996c
2 changed files with 54 additions and 28 deletions

View File

@ -992,6 +992,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_skel", "src\mod\applica
{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 @@ Global
{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 @@ Global
{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}

View File

@ -158,10 +158,10 @@ static switch_status_t channel_on_init(switch_core_session_t * session)
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 @@ static switch_status_t channel_on_hangup(switch_core_session_t * session)
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 @@ static switch_status_t channel_on_routing(switch_core_session_t * session)
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 @@ static switch_status_t channel_on_execute(switch_core_session_t * session)
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 @@ static switch_status_t channel_kill_channel(switch_core_session_t * session, int
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 @@ static switch_status_t channel_read_frame(switch_core_session_t * session,
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 @@ static switch_status_t channel_write_frame(switch_core_session_t * session,
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 @@ static switch_status_t channel_answer_channel(switch_core_session_t * session)
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 @@ static switch_status_t channel_receive_message(switch_core_session_t * session,
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 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t * sess
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 @@ static void *SWITCH_THREAD_FUNC skypiax_signaling_thread_func(switch_thread_t *
} 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 @@ int remote_party_is_ringing(private_t * tech_pvt)
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 @@ int remote_party_is_early_media(private_t * tech_pvt)
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 @@ int outbound_channel_answered(private_t * tech_pvt)
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;