X-Git-Url: http://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=common%2Fnewmodules%2Fn6110.c;h=410808d6dd01c4a36f50a53b9c2507fff87730ea;hp=bd702853a3b77758bc2a1ff2793a3e58363e961c;hb=904fbca3413cf85b03ca02aab5b80a9e8d2075c6;hpb=5d49fe8eea4e11457b4f9904eb0d5db435679841 diff --git a/common/newmodules/n6110.c b/common/newmodules/n6110.c index bd70285..410808d 100644 --- a/common/newmodules/n6110.c +++ b/common/newmodules/n6110.c @@ -124,7 +124,7 @@ GSM_Functions N6110_Functions = { GSM_Information N6110_Information = { "3210|3310|3330|5110|5130|5190|6110|6130|6150|6190|8210|8850", /* Supported models in FBUS */ - "3210|3310|3330|5110|5130|5190|6110|6130|6150|6190|8210|8850", + "3210|3310|3330|5110|5130|5190|6110|6130|6150|6190|8210|8850|9210", /* Supported models in MBUS */ "6110|6130|6150|8210|8850", /* Supported models in FBUS over infrared */ @@ -135,7 +135,7 @@ GSM_Information N6110_Information = { "8210|8850", /* infrared sockets */ "6110|6130|6150|8210|8850", - /* Supported models in FBUS over infrared with Tekram device */ + /* Supported models in FBUS over infrared with Tekram device */ "", 4, /* Max RF Level */ 0, /* Min RF Level */ GRF_Arbitrary, /* RF level units */ @@ -3679,14 +3679,10 @@ void N6110_ReplyGetSMSMessage(u16 MessageLength, u8 *MessageBuffer, u8 MessageTy fprintf(stdout, _("Message: SMS reading failed\n")); switch (MessageBuffer[4]) { - case 0x02: - fprintf(stdout, _(" Invalid location!\n"));break; - case 0x07: - fprintf(stdout, _(" Empty SMS location.\n"));break; - case 0x0c: - fprintf(stdout, _(" No access to memory (no PIN on card ?)\n"));break; - default: - fprintf(stdout, _(" Error code %i - please report it \n"),MessageBuffer[4]);break; + case 0x02:fprintf(stdout, _(" Invalid location!\n"));break; + case 0x07:fprintf(stdout, _(" Empty SMS location.\n"));break; + case 0x0c:fprintf(stdout, _(" No access to memory (no PIN on card ?)\n"));break; + default :fprintf(stdout, _(" Error code %i - please report it \n"),MessageBuffer[4]);break; } #endif /* DEBUG */ @@ -3773,8 +3769,7 @@ GSM_Error GSM_EncodeNokiaSMSFrame(GSM_SMSMessage *SMS, unsigned char *req, int * switch (PDU) { case SMS_Submit: offset=5; - for (i=0;i<((ETSI.Number[0]+1)/2+1)+1;i++) - req[i+12+offset]=ETSI.Number[i]; + for (i=0;i<((ETSI.Number[0]+1)/2+1)+1;i++) req[i+12+offset]=ETSI.Number[i]; req[10+offset]=ETSI.TPDCS; req[11+offset]=ETSI.TPUDL; req[24+offset]=ETSI.TPVP; @@ -3784,21 +3779,17 @@ GSM_Error GSM_EncodeNokiaSMSFrame(GSM_SMSMessage *SMS, unsigned char *req, int * // fprintf(stdout,_(" TP-DCS: %02x\n"),ETSI.TPDCS); #endif // req[]=ETSI.TPPID; - for(i=0;i<*length;i++) - req[i+31+offset]=ETSI.MessageText[i]; + for(i=0;i<*length;i++) req[i+31+offset]=ETSI.MessageText[i]; break; case SMS_Deliver: offset=4; - for (i=0;i<((ETSI.Number[0]+1)/2+1)+1;i++) - req[i+12+offset]=ETSI.Number[i]; + for (i=0;i<((ETSI.Number[0]+1)/2+1)+1;i++) req[i+12+offset]=ETSI.Number[i]; req[10+offset]=ETSI.TPDCS; req[11+offset]=ETSI.TPUDL; // req[]=ETSI.TPPID; - for(i=0;i<*length;i++) - req[i+31+offset]=ETSI.MessageText[i]; - for (i=0;i<7;i++) - req[24+offset+i]=ETSI.DeliveryDateTime[i]; + for(i=0;i<*length;i++) req[i+31+offset]=ETSI.MessageText[i]; + for (i=0;i<7;i++) req[24+offset+i]=ETSI.DeliveryDateTime[i]; break; default: break; @@ -5322,7 +5313,7 @@ void N6110_RX_HandleRLPMessage(u8 *MessageBuffer) /* We do not need RLP frame parsing to be done when we do not have callback specified. */ if (CurrentRLP_RXCallback == NULL) - return; + exit; /* Anybody know the official meaning of the first two bytes? Nokia 6150 sends junk frames starting D9 01, and real frames starting