From f32e37990dc161e2da889394791385c9aba56657 Mon Sep 17 00:00:00 2001 From: Giovanni Maruzzelli Date: Fri, 14 Aug 2009 21:00:02 +0000 Subject: [PATCH] skypiax: compile on windoz, not yet tested git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14521 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_skypiax/mod_skypiax.c | 4 ++-- src/mod/endpoints/mod_skypiax/skypiax_protocol.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_skypiax/mod_skypiax.c b/src/mod/endpoints/mod_skypiax/mod_skypiax.c index d29810f68b..6ce63b661d 100644 --- a/src/mod/endpoints/mod_skypiax/mod_skypiax.c +++ b/src/mod/endpoints/mod_skypiax/mod_skypiax.c @@ -894,7 +894,7 @@ static void *SWITCH_THREAD_FUNC skypiax_signaling_thread_func(switch_thread_t * if (channel) { switch_channel_state_t state = switch_channel_get_state(channel); if (state < CS_EXECUTE) { - usleep(10000); //10 msec, let the state evolve from CS_NEW + switch_sleep(10000); //10 msec, let the state evolve from CS_NEW } switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); } else { @@ -909,7 +909,7 @@ static void *SWITCH_THREAD_FUNC skypiax_signaling_thread_func(switch_thread_t * *tech_pvt->skype_call_id = '\0'; //ERRORA("LET'S WAIT\n", SKYPIAX_P_LOG); - usleep(300000); //0.3 sec + switch_sleep(300000); //0.3 sec //ERRORA("WAIT'S OVER\n", SKYPIAX_P_LOG); tech_pvt->skype_callflow = CALLFLOW_STATUS_FINISHED; } else { diff --git a/src/mod/endpoints/mod_skypiax/skypiax_protocol.c b/src/mod/endpoints/mod_skypiax/skypiax_protocol.c index e374e044d1..a401858f22 100644 --- a/src/mod/endpoints/mod_skypiax/skypiax_protocol.c +++ b/src/mod/endpoints/mod_skypiax/skypiax_protocol.c @@ -50,7 +50,7 @@ int skypiax_socket_create_and_bind(private_t * tech_pvt, int *which_port) while (bind(s, (struct sockaddr *) &my_addr, sizeof(struct sockaddr)) < 0) { DEBUGA_SKYPE("*which_port=%d, tech_pvt->tcp_cli_port=%d, tech_pvt->tcp_srv_port=%d\n", SKYPIAX_P_LOG, *which_port, tech_pvt->tcp_cli_port, tech_pvt->tcp_srv_port); - DEBUGA_SKYPE("EADDRINUSE=%d, bind errno=%d, error: %s\n", SKYPIAX_P_LOG, EADDRINUSE, errno, strerror(errno)); + DEBUGA_SKYPE("bind errno=%d, error: %s\n", SKYPIAX_P_LOG, errno, strerror(errno)); start_port++; my_addr.sin_port = htons(start_port); *which_port = start_port;