On Wed, Sep 10, 2008 at 1:04 PM, Pedro Gon?alves <pedro.pandre at gmail.com>wrote: > I see that in pjsua_media.c, in create_ice_media_transports(), line 790, > this is being made: > PJSUA_UNLOCK(); > while (pjsua_var.calls[i].med_tp_ready == PJ_EPENDING) { > pjsua_handle_events(100); > } > PJSUA_LOCK(); > > I guess I need something similar in my app, and what I am using now is > something like: > int sleep_time = 100; > int ice_create_max_sleeps = 50; > while (my_med_transport_status == PJ_EPENDING && sleeps < > ice_create_max_sleeps) { > pj_thread_sleep(sleep_time); > sleeps++; > } > > Is this OK? > Probably my solution is not 100% correct, as it seems to me that it is > preventing the correct initialization of ICE transport (in the time that > can be seen above - 100 * 50 ms = 5secs, my on_ice_complete callback is > not being called with PJ_ICE_STRANS_OP_INIT > > Who's polling the event with that loop? If none, then that explains why the callback is not called. And anyway, using sleep() is not a good idea and often it shows that the design needs to be revised. -benny > Cheers > Pedro Gon?alves > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080910/ab844b4e/attachment-0001.html