static void handleCLMessage ( Task task, MessageId id, Message message )
{
MAIN_DEBUG(("CL[%x]\n",id)) ;
UNUSED(task); /* Can be used depending on compile-time definitions */
switch(id)
{
case CL_INIT_CFM:
MAIN_DEBUG_L1(("CL_INIT_CFM [%d]\n" , ((CL_INIT_CFM_T*)message)->status ));
if(((const CL_INIT_CFM_T*)message)->status == success)
{
LocalDeviceInit(task);
#ifdef ENABLE_PEER
if (VmGetResetSource() != UNEXPECTED_RESET)
{
peerPurgeTemporaryPairing();
}
#endif
/* Initialize the transport manager. */
TransportMgrInit();
#ifdef ENABLE_GAIA
/* Initialise Gaia with a concurrent connection limit of 1 */
GaiaInit(task, 1);
#endif
}
else
{
Panic();
}
sinkNfcTagConfigReq(&theSink.task);
break;
case CL_DM_WRITE_INQUIRY_MODE_CFM:
/* Read the local name to put in our EIR data */
ConnectionReadInquiryTx(&theSink.task);
break;
case CL_DM_READ_INQUIRY_TX_CFM:
sinkInquirySetInquiryTx(((const CL_DM_READ_INQUIRY_TX_CFM_T*)message)->tx_power);
ConnectionReadLocalName(&theSink.task);