Commit 5fe71db3 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Use Sleep() function on Windows Phone 8.

parent 14a26b78
......@@ -99,15 +99,6 @@ int belle_sip_thread_key_delete(belle_sip_thread_key_t key){
return TlsFree(key) ? 0 : -1;
}
#ifdef WINAPI_FAMILY_PHONE_APP
void belle_sip_sleep(unsigned int ms) {
HANDLE sleepEvent = CreateEventEx(NULL, NULL, CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);
if (!sleepEvent)
return;
WaitForSingleObjectEx(sleepEvent, ms, FALSE);
}
#endif
#else
#include <signal.h>
......
......@@ -98,12 +98,13 @@ const char *belle_sip_get_socket_error_string();
const char *belle_sip_get_socket_error_string_from_code(int code);
#ifdef WINAPI_FAMILY_PHONE_APP
BELLESIP_INTERNAL_EXPORT void belle_sip_sleep(unsigned int ms);
void WINAPI Sleep(DWORD ms);
#define belle_sip_sleep Sleep
#else
#define belle_sip_sleep Sleep
#endif
#define usleep(us) Sleep((us)/1000)
#define usleep(us) belle_sip_sleep((us)/1000)
static BELLESIP_INLINE int inet_aton(const char *ip, struct in_addr *p){
*(long*)p=inet_addr(ip);
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment