Author: sayer
Date: 2009-10-22 23:24:15 +0200 (Thu, 22 Oct 2009)
New Revision: 1569
Modified:
trunk/apps/dsm/mods/mod_conference/ModConference.cpp
trunk/apps/dsm/mods/mod_conference/Readme.mod_conference.txt
Log:
ERRNO -> RES, exception on error
Modified: trunk/apps/dsm/mods/mod_conference/ModConference.cpp
===================================================================
--- trunk/apps/dsm/mods/mod_conference/ModConference.cpp 2009-10-22
21:18:05 UTC (rev 1568)
+++ trunk/apps/dsm/mods/mod_conference/ModConference.cpp 2009-10-22
21:24:15 UTC (rev 1569)
@@ -65,10 +65,12 @@
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 @@
sess->getLocalTag());
if (NULL == chan) {
ERROR("obtaining conference channel\n");
+ throw DSMException("conference");
return false;
}
if (NULL != *dsm_chan) {
@@ -130,9 +133,9 @@
// 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 @@
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 @@
}
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 @@
sess->rtp_str.setPlayoutType(JB_PLAYOUT);
else
sess->rtp_str.setPlayoutType(SIMPLE_PLAYOUT);
+ sc_sess->SET_RES(DSM_RES_OK);
} EXEC_ACTION_END;
Modified: trunk/apps/dsm/mods/mod_conference/Readme.mod_conference.txt
===================================================================
--- trunk/apps/dsm/mods/mod_conference/Readme.mod_conference.txt
2009-10-22 21:18:05 UTC (rev 1568)
+++ trunk/apps/dsm/mods/mod_conference/Readme.mod_conference.txt
2009-10-22 21:24:15 UTC (rev 1569)
@@ -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)
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev