static int luasofia_nua_handle_options(lua_State *L) { /* get and check first argument (should be a luasofia_nua_handle_t) */ luasofia_nua_handle_t *lnh = (luasofia_nua_handle_t*) luaL_checkudata(L, 1, NUA_HANDLE_MTABLE); if (lnh->nh) { su_home_t *home = su_home_create(); /* get and check second argument (should be a tag table) */ tagi_t *tags = luasofia_tags_table_to_taglist(L, 2, home); nua_options(lnh->nh, TAG_NEXT(tags)); su_home_unref(home); } return 0; }
static apt_bool_t mrcp_sofia_session_discover_request(mrcp_session_t *session, mrcp_session_descriptor_t *descriptor) { apt_bool_t res = FALSE; mrcp_sofia_session_t *sofia_session = session->obj; if(!sofia_session) { return FALSE; } apr_thread_mutex_lock(sofia_session->mutex); if(sofia_session->nh) { res = TRUE; nua_options(sofia_session->nh,TAG_END()); } apr_thread_mutex_unlock(sofia_session->mutex); return res; }