diff --git a/apps/dsm/mods/mod_conference/ModConference.cpp b/apps/dsm/mods/mod_conference/ModConference.cpp index 7b9ac625..bb23ca84 100644 --- a/apps/dsm/mods/mod_conference/ModConference.cpp +++ b/apps/dsm/mods/mod_conference/ModConference.cpp @@ -65,10 +65,12 @@ EXEC_ACTION_START(ConfPostEventAction) { unsigned int ev; if (str2i(ev_id, ev)) { ERROR("decoding conference event id '%s'\n", ev_id.c_str()); + sc_sess->SET_RES(DSM_RES_UNKNOWN_ARG); return false; } AmConferenceStatus::postConferenceEvent(channel_id, ev, sess->getLocalTag()); + sc_sess->SET_RES(DSM_RES_OK); } EXEC_ACTION_END; static bool ConferenceJoinChannel(DSMConfChannel** dsm_chan, @@ -94,6 +96,7 @@ static bool ConferenceJoinChannel(DSMConfChannel** dsm_chan, sess->getLocalTag()); if (NULL == chan) { ERROR("obtaining conference channel\n"); + throw DSMException("conference"); return false; } if (NULL != *dsm_chan) { @@ -130,9 +133,9 @@ EXEC_ACTION_START(ConfJoinAction) { // add to garbage collector sc_sess->transferOwnership(dsm_chan); - sc_sess->SET_ERRNO(DSM_ERRNO_OK); + sc_sess->SET_RES(DSM_RES_OK); } else { - sc_sess->SET_ERRNO(DSM_ERRNO_UNKNOWN_ARG); + sc_sess->SET_RES(DSM_RES_UNKNOWN_ARG); } } EXEC_ACTION_END; @@ -160,10 +163,12 @@ EXEC_ACTION_START(ConfLeaveAction) { DSMConfChannel* chan = getDSMConfChannel(sc_sess); if (NULL == chan) { WARN("app error: trying to leave conference, but channel not found\n"); - sc_sess->SET_ERRNO(DSM_ERRNO_UNKNOWN_ARG); + sc_sess->SET_RES(DSM_RES_UNKNOWN_ARG); return false; } chan->release(); + + sc_sess->SET_RES(DSM_RES_OK); } EXEC_ACTION_END; CONST_ACTION_2P(ConfRejoinAction, ',', true); @@ -179,9 +184,9 @@ EXEC_ACTION_START(ConfRejoinAction) { } if (ConferenceJoinChannel(&chan, sess, sc_sess, channel_id, mode)) { - sc_sess->SET_ERRNO(DSM_ERRNO_OK); + sc_sess->SET_RES(DSM_RES_OK); } else { - sc_sess->SET_ERRNO(DSM_ERRNO_UNKNOWN_ARG); + sc_sess->SET_RES(DSM_RES_UNKNOWN_ARG); } } EXEC_ACTION_END; @@ -193,4 +198,5 @@ EXEC_ACTION_START(ConfSetPlayoutTypeAction) { sess->rtp_str.setPlayoutType(JB_PLAYOUT); else sess->rtp_str.setPlayoutType(SIMPLE_PLAYOUT); + sc_sess->SET_RES(DSM_RES_OK); } EXEC_ACTION_END; diff --git a/apps/dsm/mods/mod_conference/Readme.mod_conference.txt b/apps/dsm/mods/mod_conference/Readme.mod_conference.txt index f9edb3bc..8b70820a 100644 --- a/apps/dsm/mods/mod_conference/Readme.mod_conference.txt +++ b/apps/dsm/mods/mod_conference/Readme.mod_conference.txt @@ -1,12 +1,14 @@ Actions: conference.join(string roomname [, string mode]) mode = "" | speakonly | listenonly + Throws "conference" Exception if conference can not be joined (currently never). conference.leave() destroy conference channel. Close playlist first!!!!! conference.rejoin(string roomname [, string mode]) mode = "" | speakonly | listenonly + Throws "conference" Exception if conference can not be joined (currently never). conference.postEvent(string roomname, int event_id)