Logo Search packages:      
Sourcecode: capisuite version File versions  Download package

void Connection::data_b3_ind ( _cmsg &  message  )  throw (CapiError,CapiWrongState,CapiMsgError) [protected]

called when we get DATA_B3_IND from CAPI

This method will also save the received data, send a response to Capi and call CallInterface::dataIn().

Parameters:
message the received DATA_B3_IND message
Exceptions:
CapiError Thrown when an invalid message is received
CapiWrongState Thrown when the message is received unexpected (i.e. in a wrong ncci_state)
CapiMsgError Thrown by Capi::data_b3_resp()

Definition at line 528 of file connection.cpp.

References call_if, capi, Capi::data_b3_resp(), CallInterface::dataIn(), file_for_reception, N4, NACT, ncci, ncci_state, and receive_mutex.

{
      if (ncci_state!=NACT && ncci_state!=N4)
            throw CapiWrongState("DATA_B3_IND received in wrong state","Connection::data_b3_ind()");

      if (ncci!=CONNECT_B3_IND_NCCI(&message))
            throw CapiError("DATA_B3_IND received with wrong NCCI","Connection::data_b3_ind()");

      pthread_mutex_lock(&receive_mutex);
      if (file_for_reception) {
            for (int i=0;i<DATA_B3_IND_DATALENGTH(&message);i++)
                  (*file_for_reception) << DATA_B3_IND_DATA(&message)[i];
      }
      pthread_mutex_unlock(&receive_mutex);

      if (call_if)
            call_if->dataIn(DATA_B3_IND_DATA(&message),DATA_B3_IND_DATALENGTH(&message));

      capi->data_b3_resp(message.Messagenumber,ncci,DATA_B3_IND_DATAHANDLE(&message));
}


Generated by  Doxygen 1.6.0   Back to index