diff options
Diffstat (limited to 'tizen')
-rw-r--r-- | tizen/src/emulator.c | 15 | ||||
-rw-r--r-- | tizen/src/guest_server.c | 4 | ||||
-rw-r--r-- | tizen/src/skin/maruskin_server.c | 8 |
3 files changed, 19 insertions, 8 deletions
diff --git a/tizen/src/emulator.c b/tizen/src/emulator.c index 95852a3cc1..1e3a2500f6 100644 --- a/tizen/src/emulator.c +++ b/tizen/src/emulator.c @@ -41,6 +41,9 @@ #include "guest_server.h" #include "debug_ch.h" #include "process.h" +#ifdef _WIN32 +#include <winsock2.h> +#endif MULTI_DEBUG_CHANNEL(qemu, main); @@ -140,6 +143,14 @@ int qemu_main(int argc, char** argv, char** envp); int main(int argc, char* argv[]) { +#ifdef _WIN32 + WSADATA wsadata; + if(WSAStartup(MAKEWORD(2,0), &wsadata) == SOCKET_ERROR) { + ERR("Error creating socket.\n"); + return NULL; + } +#endif + tizen_base_port = get_sdb_base_port(); int skin_argc = 0; @@ -185,6 +196,10 @@ int main(int argc, char* argv[]) exit_emulator(); +#ifdef _WIN32 + WSACleanup(); +#endif + return 0; } diff --git a/tizen/src/guest_server.c b/tizen/src/guest_server.c index a7d876329d..1101ca5b4c 100644 --- a/tizen/src/guest_server.c +++ b/tizen/src/guest_server.c @@ -63,6 +63,8 @@ pthread_t start_guest_server( int server_port ) { if ( 0 != pthread_create( &thread_id, NULL, run_guest_server, NULL ) ) { ERR( "fail to create guest_server pthread.\n" ); + }else { + INFO( "created guest server thread\n" ); } return thread_id; @@ -71,6 +73,8 @@ pthread_t start_guest_server( int server_port ) { static void* run_guest_server( void* args ) { + INFO( "start guest server thread.\n" ); + uint16_t port; struct sockaddr_in server_addr, client_addr; socklen_t client_len; diff --git a/tizen/src/skin/maruskin_server.c b/tizen/src/skin/maruskin_server.c index f8a68b5158..89df27f60b 100644 --- a/tizen/src/skin/maruskin_server.c +++ b/tizen/src/skin/maruskin_server.c @@ -153,14 +153,6 @@ static void* run_skin_server( void* args ) { struct sockaddr_in server_addr, client_addr; socklen_t client_len; -#ifdef __MINGW32__ - WSADATA wsadata; - if(WSAStartup(MAKEWORD(2,0), &wsadata) == SOCKET_ERROR) { - ERR("Error creating socket.\n"); - return NULL; - } -#endif - port = svr_port; if ( ( server_sock = socket( PF_INET, SOCK_STREAM, IPPROTO_TCP ) ) < 0 ) { |