/** This callback will be called by SIP stack to process incoming events */ static void mrcp_sofia_event_callback( nua_event_t nua_event, int status, char const *phrase, nua_t *nua, mrcp_sofia_agent_t *sofia_agent, nua_handle_t *nh, mrcp_sofia_session_t *sofia_session, sip_t const *sip, tagi_t tags[]) { apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive SIP Event [%s] Status %d %s",nua_event_name(nua_event),status,phrase); switch(nua_event) { case nua_i_state: mrcp_sofia_on_state_change(sofia_agent,nh,sofia_session,sip,tags); break; case nua_i_options: mrcp_sofia_on_resource_discover(sofia_agent,nh,sofia_session,sip,tags); break; case nua_r_shutdown: /* if status < 200, shutdown still in progress */ if(status >= 200) { /* break main loop of sofia thread */ su_root_break(sofia_agent->root); } break; default: break; } }
void increment(struct tester *tester, su_timer_t *t, struct timing *ti) { tester->times++; if ((void *)ti == (void*)tester->sentinel) su_root_break(tester->root); }
void end_test(struct tester *tester, su_timer_t *t, struct timing *ti) { printf("ending test\n"); su_timer_destroy(t); su_timer_reset(tester->t); su_timer_reset(tester->t1); su_root_break(tester->root); }
static void sofsip_shutdown_cb(void) { #if SOFSIP_USE_GLIB_EVENT_LOOP GMainLoop *ptr = (GMainLoop*)global_cli_p->cli_main; g_main_loop_quit(ptr); #else su_root_break(global_cli_p->cli_root); #endif }
/** "Stop" message function for pthread clone. * * @sa su_clone_wait() * @internal */ static void su_pthread_port_clone_break(su_root_magic_t *m, su_msg_r msg, su_msg_arg_t *a) { su_root_t *root = su_msg_to(msg)->sut_root; root->sur_deiniting = 1; su_root_break(root); }
static int luasofia_su_root_break(lua_State *L) { luasofia_su_root_t *lroot = NULL; /* get and check first argument (should be a root) */ lroot = (luasofia_su_root_t*)luaL_checkudata(L, -1, SU_ROOT_MTABLE); su_root_break(lroot->root); return 0; }
static void test_break(struct tester *tester, su_msg_r msg, su_msg_arg_t *arg) { su_root_break(tester->root); }