diff options
author | Youness Alaoui <kakaroto@kakaroto.(none)> | 2008-10-29 13:21:16 -0400 |
---|---|---|
committer | Youness Alaoui <kakaroto@kakaroto.(none)> | 2008-10-29 13:21:16 -0400 |
commit | bc14048976bcecf69a2f51ba5df838b174b412a5 (patch) | |
tree | cda9cc2eff498e3c2e31f0fed4a29585c2123fbd /agent | |
parent | 3c40f049fc421fe2d57c07b5a09d988ca2bbc424 (diff) | |
download | libnice-bc14048976bcecf69a2f51ba5df838b174b412a5.tar.gz |
port tests to windows
Diffstat (limited to 'agent')
-rw-r--r-- | agent/test-fallback.c | 5 | ||||
-rw-r--r-- | agent/test-fullmode.c | 21 | ||||
-rw-r--r-- | agent/test-restart.c | 6 | ||||
-rw-r--r-- | agent/test-thread.c | 8 |
4 files changed, 21 insertions, 19 deletions
diff --git a/agent/test-fallback.c b/agent/test-fallback.c index 1af831b..f54140e 100644 --- a/agent/test-fallback.c +++ b/agent/test-fallback.c @@ -39,11 +39,12 @@ # include <config.h> #endif +#include "agent.h" +#include "agent-priv.h" /* for testing purposes */ + #include <stdlib.h> #include <string.h> -#include "agent.h" -#include "agent-priv.h" /* for testing purposes */ static NiceComponentState global_lagent_state = NICE_COMPONENT_STATE_LAST; static NiceComponentState global_ragent_state = NICE_COMPONENT_STATE_LAST; diff --git a/agent/test-fullmode.c b/agent/test-fullmode.c index 34f9618..e93fa71 100644 --- a/agent/test-fullmode.c +++ b/agent/test-fullmode.c @@ -38,10 +38,11 @@ # include <config.h> #endif +#include "agent.h" + #include <stdlib.h> #include <string.h> -#include "agent.h" #define USE_TURN 0 #define USE_LOOPBACK 1 @@ -127,7 +128,7 @@ static void cb_nice_recv (NiceAgent *agent, guint stream_id, guint component_id, if (strncmp ("12345678", buf, 8)) return; - if ((intptr_t)user_data == 2) { + if ((int)user_data == 2) { global_ragent_read = len; g_main_loop_quit (global_mainloop); } @@ -137,9 +138,9 @@ static void cb_candidate_gathering_done(NiceAgent *agent, gpointer data) { g_debug ("test-fullmode:%s: %p", G_STRFUNC, data); - if ((intptr_t)data == 1) + if ((int)data == 1) global_lagent_gathering_done = TRUE; - else if ((intptr_t)data == 2) + else if ((int)data == 2) global_ragent_gathering_done = TRUE; if (global_lagent_gathering_done && @@ -154,9 +155,9 @@ static void cb_component_state_changed (NiceAgent *agent, guint stream_id, guint { g_debug ("test-fullmode:%s: %p", __func__, data); - if ((intptr_t)data == 1) + if ((int)data == 1) global_lagent_state[component_id - 1] = state; - else if ((intptr_t)data == 2) + else if ((int)data == 2) global_ragent_state[component_id - 1] = state; if (state == NICE_COMPONENT_STATE_READY) @@ -191,9 +192,9 @@ static void cb_new_selected_pair(NiceAgent *agent, guint stream_id, guint compon { g_debug ("test-fullmode:%s: %p", __func__, data); - if ((intptr_t)data == 1) + if ((int)data == 1) ++global_lagent_cands; - else if ((intptr_t)data == 2) + else if ((int)data == 2) ++global_ragent_cands; /* XXX: dear compiler, these are for you: */ @@ -213,9 +214,9 @@ static void cb_initial_binding_request_received(NiceAgent *agent, guint stream_i { g_debug ("test-fullmode:%s: %p", __func__, data); - if ((intptr_t)data == 1) + if ((int)data == 1) global_lagent_ibr_received = TRUE; - else if ((intptr_t)data == 2) + else if ((int)data == 2) global_ragent_ibr_received = TRUE; if (global_exit_when_ibr_received) diff --git a/agent/test-restart.c b/agent/test-restart.c index 60758bc..f9d343d 100644 --- a/agent/test-restart.c +++ b/agent/test-restart.c @@ -36,12 +36,12 @@ # include <config.h> #endif -#include <stdlib.h> -#include <string.h> - #include "agent.h" #include "agent-priv.h" /* for testing purposes */ +#include <stdlib.h> +#include <string.h> + static NiceComponentState global_lagent_state = NICE_COMPONENT_STATE_LAST; static NiceComponentState global_ragent_state = NICE_COMPONENT_STATE_LAST; static guint global_components_ready = 0; diff --git a/agent/test-thread.c b/agent/test-thread.c index a8b7153..679403d 100644 --- a/agent/test-thread.c +++ b/agent/test-thread.c @@ -38,11 +38,11 @@ # include <config.h> #endif +#include "agent.h" + #include <stdlib.h> #include <string.h> -#include "agent.h" - GMainLoop *error_loop; gint global_lagent_cands = 0; @@ -82,9 +82,9 @@ cb_new_selected_pair(NiceAgent *agent, { g_debug ("test-thread:%s: %p", __func__, data); - if ((intptr_t)data == 1) + if ((int)data == 1) g_atomic_int_inc (&global_lagent_cands); - else if ((intptr_t)data == 2) + else if ((int)data == 2) g_atomic_int_inc (&global_ragent_cands); } |