* src/modules/connectmodule.{h,cpp} (ConnectModule): throw

CapiExternalError only when connection's already up, otherwise
  use CapiWrongState


git-svn-id: https://svn.ibp.de/svn/capisuite/trunk/capisuite@201 4ebea2bb-67d4-0310-8558-a5799e421b66
This commit is contained in:
gernot 2003-12-31 16:28:55 +00:00
parent 6e07170c33
commit 8861fe7d46
3 changed files with 18 additions and 9 deletions

View File

@ -1,9 +1,12 @@
2003-12-31 Gernot Hillier <gernot@hillier.de> 2003-12-31 Gernot Hillier <gernot@hillier.de>
* src/modules/connectmodule.{h,cpp} (ConnectModule): throw
CapiExternalError only when connection's already up, otherwise
use CapiWrongState
* scripts/incoming.py (voiceIncoming): include recorded msg length * scripts/incoming.py (voiceIncoming): include recorded msg length
and host name were file is stored in sent mail (closes bug #6, and host name were file is stored in sent mail (closes bug #6,
thx to Achim Bohnet and Thomas Niesel for the feature requests) thx to Achim Bohnet and Thomas Niesel for the feature requests)
2003-12-31 Gernot Hillier <gernot@hillier.de>
* scripts/cs_helpers.pyin (sendMIMEMail): use 16 bit ouput when * scripts/cs_helpers.pyin (sendMIMEMail): use 16 bit ouput when
converting sound files from la to wav. Thx to Holger Krull for converting sound files from la to wav. Thx to Holger Krull for
the fix (closes bug #51)! the fix (closes bug #51)!
@ -13,8 +16,6 @@
adding of CVS log messages to source files as we now have adding of CVS log messages to source files as we now have
this nice ChangeLog file this nice ChangeLog file
2003-12-28 Gernot Hillier <gernot@hillier.de>
* src/modules/audioreceive.{h,cpp} (AudioReceive,mainLoop), * src/modules/audioreceive.{h,cpp} (AudioReceive,mainLoop),
src/modules/audiosend.{h,cpp} (AudioSend,mainLoop), src/modules/audiosend.{h,cpp} (AudioSend,mainLoop),
src/modules/callmodule.{h,cpp} (CallModule,mainLoop), src/modules/callmodule.{h,cpp} (CallModule,mainLoop),

View File

@ -2,7 +2,7 @@
@brief Contains ConnectModule - Call Module for connection establishment at incoming connection @brief Contains ConnectModule - Call Module for connection establishment at incoming connection
@author Gernot Hillier <gernot@hillier.de> @author Gernot Hillier <gernot@hillier.de>
$Revision: 1.4 $ $Revision: 1.5 $
*/ */
/*************************************************************************** /***************************************************************************
@ -16,11 +16,13 @@
#include "connectmodule.h" #include "connectmodule.h"
ConnectModule::ConnectModule(Connection *conn_in, Connection::service_t service, string faxStationID, string faxHeadline) throw (CapiExternalError) ConnectModule::ConnectModule(Connection *conn_in, Connection::service_t service, string faxStationID, string faxHeadline) throw (CapiWrongState,CapiExternalError)
:CallModule(conn_in,-1,false,false),service(service),faxStationID(faxStationID),faxHeadline(faxHeadline) :CallModule(conn_in,-1,false,false),service(service),faxStationID(faxStationID),faxHeadline(faxHeadline)
{ {
if (conn->getState()==Connection::UP)
throw CapiExternalError("Call is already connected","ConnectModule::ConnectModule()");
if (conn->getState()!=Connection::WAITING) if (conn->getState()!=Connection::WAITING)
throw CapiExternalError("Can't connect because call not waiting","ConnectModule::ConnectModule()"); throw CapiWrongState("Can't connect because call not waiting","ConnectModule::ConnectModule()");
} }
void void

View File

@ -2,7 +2,7 @@
@brief Contains ConnectModule - Call Module for connection establishment at incoming connection @brief Contains ConnectModule - Call Module for connection establishment at incoming connection
@author Gernot Hillier <gernot@hillier.de> @author Gernot Hillier <gernot@hillier.de>
$Revision: 1.3 $ $Revision: 1.4 $
*/ */
/*************************************************************************** /***************************************************************************
@ -40,9 +40,10 @@ class ConnectModule: public CallModule
@param service service to connect with as described in Connection::service_t @param service service to connect with as described in Connection::service_t
@param faxStationID fax station ID, only necessary when connecting in FAXG3 mode @param faxStationID fax station ID, only necessary when connecting in FAXG3 mode
@param faxHeadline fax headline, only necessary when connecting in FAXG3 mode @param faxHeadline fax headline, only necessary when connecting in FAXG3 mode
@throw CapiExternalError Thrown if Connection not in waiting state @throw CapiExternalError Thrown if Connection already up
@throw CapiWrongState Thrown if Connection not in waiting state
*/ */
ConnectModule(Connection *conn, Connection::service_t service, string faxStationID, string faxHeadline) throw (CapiExternalError); ConnectModule(Connection *conn, Connection::service_t service, string faxStationID, string faxHeadline) throw (CapiWrongState,CapiExternalError);
/** @brief Accept connection and wait for complete establishment /** @brief Accept connection and wait for complete establishment
@ -67,6 +68,11 @@ class ConnectModule: public CallModule
/* History /* History
$Log: connectmodule.h,v $ $Log: connectmodule.h,v $
Revision 1.4 2003/12/31 16:28:55 gernot
* src/modules/connectmodule.{h,cpp} (ConnectModule): throw
CapiExternalError only when connection's already up, otherwise
use CapiWrongState
Revision 1.3 2003/12/28 21:01:04 gernot Revision 1.3 2003/12/28 21:01:04 gernot
- reworked TODO, disabled automatic log message adding to source files - reworked TODO, disabled automatic log message adding to source files