~ubuntu-branches/debian/stretch/libnice/stretch

« back to all changes in this revision

Viewing changes to tests/test-dribble.c

  • Committer: Package Import Robot
  • Author(s): Simon McVittie
  • Date: 2014-05-14 12:00:13 UTC
  • mfrom: (1.2.9) (5.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20140514120013-fi5mh9bexrjnwnd8
Tags: 0.1.7-1
* New upstream release 0.1.6, 0.1.7
  - fixes various compiler warnings that were mistakenly fatal in 0.1.5
    (Closes: #743232, #743233)
  - update symbols file for new API
* Explicitly disable -Werror, even if we package a non-release in future
* Don't run tests during the build. We were ignoring failures already,
  and they sometimes hang until the buildd terminates them.
  Upstream (Olivier Crête) says they are stable enough to be useful
  for developers, but not for integration testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
 
129
129
static void cb_component_state_changed (NiceAgent *agent, guint stream_id, guint component_id, guint state, gpointer data)
130
130
{
 
131
  gboolean ready_to_connected = FALSE;
131
132
  g_debug ("test-dribble:%s: %p", G_STRFUNC, data);
132
133
 
133
 
  if (GPOINTER_TO_UINT (data) == 1)
 
134
  if (GPOINTER_TO_UINT (data) == 1) {
 
135
    if (global_lagent_state == NICE_COMPONENT_STATE_READY &&
 
136
        state == NICE_COMPONENT_STATE_CONNECTED)
 
137
      ready_to_connected = TRUE;
134
138
    global_lagent_state = state;
135
 
  else if (GPOINTER_TO_UINT (data) == 2)
 
139
  } else if (GPOINTER_TO_UINT (data) == 2) {
 
140
    if (global_ragent_state == NICE_COMPONENT_STATE_READY &&
 
141
        state == NICE_COMPONENT_STATE_CONNECTED)
 
142
      ready_to_connected = TRUE;
136
143
    global_ragent_state = state;
137
 
  
 
144
  }
 
145
 
138
146
  if (state == NICE_COMPONENT_STATE_READY)
139
147
    global_components_ready++;
 
148
  else if (state == NICE_COMPONENT_STATE_CONNECTED && ready_to_connected)
 
149
    global_components_ready--;
140
150
  if (state == NICE_COMPONENT_STATE_FAILED)
141
151
    global_components_failed++;
142
152
 
206
216
#endif
207
217
 
208
218
  g_type_init ();
209
 
#if !GLIB_CHECK_VERSION(2,31,8)
210
219
  g_thread_init (NULL);
211
 
#endif
212
220
 
213
221
  global_mainloop = g_main_loop_new (NULL, FALSE);
214
222
 
341
349
  g_timeout_add (500, quit_loop_cb, NULL);
342
350
  g_main_loop_run (global_mainloop);
343
351
 
344
 
  global_components_ready--;
 
352
  //global_components_ready--;
345
353
 
346
354
  cands = nice_agent_get_local_candidates (ragent, rs_id, NICE_COMPONENT_TYPE_RTP);
347
355
  nice_address_set_port(&((NiceCandidate *) cands->data)->addr, 80);