cam_menu.cpp: handle ENQ objects correctly.

Origin commit data
------------------
Branch: ni/coolstream
Commit: 3ffe8b1d23
Author: [CST] Bas <bas@coolstreamtech.com>
Date: 2013-02-04 (Mon, 04 Feb 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Bas
2013-02-04 14:43:55 +08:00
parent eceb414876
commit 32df35fe4c

View File

@@ -402,21 +402,21 @@ int CCAMMenuHandler::handleCamMsg (const neutrino_msg_t msg, neutrino_msg_data_t
printf("CCAMMenuHandler::handleCamMsg: slot %d input request, text %s\n", curslot, convertDVBUTF8(pMmiEnquiry->enguiryText, strlen(pMmiEnquiry->enguiryText), 0).c_str());
hideHintBox();
char cPIN[pMmiEnquiry->answerlen+1];
cPIN[0] = 0;
char ENQAnswer[pMmiEnquiry->answerlen+1];
ENQAnswer[0] = 0;
CPINInput* PINInput = new CPINInput((char *) convertDVBUTF8(pMmiEnquiry->enguiryText, strlen(pMmiEnquiry->enguiryText), 0).c_str(), cPIN, 4, NONEXISTANT_LOCALE);
PINInput->exec(NULL, "");
delete PINInput;
CEnquiryInput *Inquiry = new CEnquiryInput((char *)convertDVBUTF8(pMmiEnquiry->enguiryText, strlen(pMmiEnquiry->enguiryText), 0).c_str(), ENQAnswer, pMmiEnquiry->answerlen, pMmiEnquiry->blind != 0, NONEXISTANT_LOCALE);
Inquiry->exec(NULL, "");
delete Inquiry;
printf("CCAMMenuHandler::handleCamMsg: input=[%s]\n", cPIN);
printf("CCAMMenuHandler::handleCamMsg: input=[%s]\n", ENQAnswer);
if((int) strlen(cPIN) != pMmiEnquiry->answerlen) {
if((int) strlen(ENQAnswer) != pMmiEnquiry->answerlen) {
printf("CCAMMenuHandler::handleCamMsg: wrong input len\n");
ca->InputAnswer(SlotType, curslot, (unsigned char *) cPIN, 0);
ca->InputAnswer(SlotType, curslot, (unsigned char *)ENQAnswer, 0);
return 1; //FIXME
} else {
ca->InputAnswer(SlotType, curslot, (unsigned char *) cPIN, pMmiEnquiry->answerlen);
ca->InputAnswer(SlotType, curslot, (unsigned char *)ENQAnswer, pMmiEnquiry->answerlen);
return 1;
}
}