Lines Matching refs:msg

70     Return<void> addPayloadAndDispatchRequest(MsgHeader *msg, uint16_t reqLen, uint8_t *reqPtr);
96 MsgHeader *msg = (MsgHeader *)calloc(1, sizeof(MsgHeader)); in createMsgHeader() local
97 if (msg == NULL) { in createMsgHeader()
100 msg->token = token; in createMsgHeader()
101 msg->type = MsgType_REQUEST; in createMsgHeader()
102 msg->id = msgId; in createMsgHeader()
103 msg->error = Error_RIL_E_SUCCESS; in createMsgHeader()
104 return msg; in createMsgHeader()
107 Return<void> SapImpl::addPayloadAndDispatchRequest(MsgHeader *msg, uint16_t reqLen, in addPayloadAndDispatchRequest() argument
111 sendFailedResponse(msg->id, msg->token, 2, reqPtr, msg); in addPayloadAndDispatchRequest()
115 msg->payload = payload; in addPayloadAndDispatchRequest()
116 msg->payload->size = reqLen; in addPayloadAndDispatchRequest()
117 memcpy(msg->payload->bytes, reqPtr, reqLen); in addPayloadAndDispatchRequest()
122 sapSocket->dispatchRequest(msg); in addPayloadAndDispatchRequest()
125 sendFailedResponse(msg->id, msg->token, 3, payload, reqPtr, msg); in addPayloadAndDispatchRequest()
128 free(msg->payload); in addPayloadAndDispatchRequest()
189 MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_CONNECT, token); in connectReq() local
190 if (msg == NULL) { in connectReq()
204 sendFailedResponse(MsgId_RIL_SIM_SAP_CONNECT, token, 1, msg); in connectReq()
211 sendFailedResponse(MsgId_RIL_SIM_SAP_CONNECT, token, 1, msg); in connectReq()
219 sendFailedResponse(MsgId_RIL_SIM_SAP_CONNECT, token, 2, buffer, msg); in connectReq()
225 return addPayloadAndDispatchRequest(msg, stream.bytes_written, buffer); in connectReq()
230 MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_DISCONNECT, token); in disconnectReq() local
231 if (msg == NULL) { in disconnectReq()
244 sendFailedResponse(MsgId_RIL_SIM_SAP_DISCONNECT, token, 1, msg); in disconnectReq()
251 sendFailedResponse(MsgId_RIL_SIM_SAP_DISCONNECT, token, 1, msg); in disconnectReq()
260 sendFailedResponse(MsgId_RIL_SIM_SAP_DISCONNECT, token, 2, buffer, msg); in disconnectReq()
266 return addPayloadAndDispatchRequest(msg, stream.bytes_written, buffer); in disconnectReq()
271 MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_APDU, token); in apduReq() local
272 if (msg == NULL) { in apduReq()
287 sendFailedResponse(MsgId_RIL_SIM_SAP_APDU, token, 1, msg); in apduReq()
297 sendFailedResponse(MsgId_RIL_SIM_SAP_APDU, token, 2, req.command, msg); in apduReq()
304 sendFailedResponse(MsgId_RIL_SIM_SAP_APDU, token, 2, req.command, msg); in apduReq()
313 sendFailedResponse(MsgId_RIL_SIM_SAP_APDU, token, 3, req.command, buffer, msg); in apduReq()
319 return addPayloadAndDispatchRequest(msg, stream.bytes_written, buffer); in apduReq()
324 MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_TRANSFER_ATR, token); in transferAtrReq() local
325 if (msg == NULL) { in transferAtrReq()
339 sendFailedResponse(MsgId_RIL_SIM_SAP_TRANSFER_ATR, token, 1, msg); in transferAtrReq()
346 sendFailedResponse(MsgId_RIL_SIM_SAP_TRANSFER_ATR, token, 1, msg); in transferAtrReq()
355 sendFailedResponse(MsgId_RIL_SIM_SAP_TRANSFER_ATR, token, 2, buffer, msg); in transferAtrReq()
361 return addPayloadAndDispatchRequest(msg, stream.bytes_written, buffer); in transferAtrReq()
366 MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_POWER, token); in powerReq() local
367 if (msg == NULL) { in powerReq()
381 sendFailedResponse(MsgId_RIL_SIM_SAP_POWER, token, 1, msg); in powerReq()
388 sendFailedResponse(MsgId_RIL_SIM_SAP_POWER, token, 1, msg); in powerReq()
397 sendFailedResponse(MsgId_RIL_SIM_SAP_POWER, token, 2, buffer, msg); in powerReq()
403 return addPayloadAndDispatchRequest(msg, stream.bytes_written, buffer); in powerReq()
408 MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_RESET_SIM, token); in resetSimReq() local
409 if (msg == NULL) { in resetSimReq()
422 sendFailedResponse(MsgId_RIL_SIM_SAP_RESET_SIM, token, 1, msg); in resetSimReq()
429 sendFailedResponse(MsgId_RIL_SIM_SAP_RESET_SIM, token, 1, msg); in resetSimReq()
438 sendFailedResponse(MsgId_RIL_SIM_SAP_RESET_SIM, token, 2, buffer, msg); in resetSimReq()
444 return addPayloadAndDispatchRequest(msg, stream.bytes_written, buffer); in resetSimReq()
449 MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_TRANSFER_CARD_READER_STATUS, token); in transferCardReaderStatusReq() local
450 if (msg == NULL) { in transferCardReaderStatusReq()
465 sendFailedResponse(MsgId_RIL_SIM_SAP_TRANSFER_CARD_READER_STATUS, token, 1, msg); in transferCardReaderStatusReq()
472 sendFailedResponse(MsgId_RIL_SIM_SAP_TRANSFER_CARD_READER_STATUS, token, 1, msg); in transferCardReaderStatusReq()
482 sendFailedResponse(MsgId_RIL_SIM_SAP_TRANSFER_CARD_READER_STATUS, token, 2, buffer, msg); in transferCardReaderStatusReq()
488 return addPayloadAndDispatchRequest(msg, stream.bytes_written, buffer); in transferCardReaderStatusReq()
493 MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_SET_TRANSFER_PROTOCOL, token); in setTransferProtocolReq() local
494 if (msg == NULL) { in setTransferProtocolReq()
509 sendFailedResponse(MsgId_RIL_SIM_SAP_SET_TRANSFER_PROTOCOL, token, 1, msg); in setTransferProtocolReq()
516 sendFailedResponse(MsgId_RIL_SIM_SAP_SET_TRANSFER_PROTOCOL, token, 1, msg); in setTransferProtocolReq()
526 sendFailedResponse(MsgId_RIL_SIM_SAP_SET_TRANSFER_PROTOCOL, token, 2, buffer, msg); in setTransferProtocolReq()
532 return addPayloadAndDispatchRequest(msg, stream.bytes_written, buffer); in setTransferProtocolReq()