gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in the nokia 5100 driver


From: kathir
Subject: Re: Bug in the nokia 5100 driver
Date: Tue, 19 Oct 2004 19:24:35 +0530

pl tell mbus /fbus   protocol to read   messages in inbox
----- Original Message -----
From: "Pawel Kot" <address@hidden>
To: "Discussion forum for gnokii users." <address@hidden>
Sent: Tuesday, October 19, 2004 3:38 AM
Subject: Re: Bug in the nokia 5100 driver


> On Mon, 18 Oct 2004, Pedro Corte-Real wrote:
>
> > Sample output attached. The correct date for that message is "17-10-2004
> > 23:36:45"
>
> Okay. The next attempt. Please try this. You need to back out the previous
> patch. This is an ugly hack, but I didn't figure out yet how to do it
> nicely.
>
> Index: common/phones/nk6510.c
> ===================================================================
> RCS file: /cvsroot/gnokii/gnokii/common/phones/nk6510.c,v
> retrieving revision 1.158
> diff -u -r1.158 nk6510.c
> --- common/phones/nk6510.c 1 Oct 2004 20:39:53 -0000 1.158
> +++ common/phones/nk6510.c 18 Oct 2004 22:04:51 -0000
> @@ -617,7 +617,7 @@
>
>  static void ParseLayout(unsigned char *message, gn_data *data)
>  {
> - int i, subblocks;
> + int i, j, subblocks;
>   unsigned char *block = message;
>
>   ResetLayout(message, data);
> @@ -739,6 +739,15 @@
>   */
>   memcpy(data->raw_sms->smsc_time, block + 3, block[2]);
>   break;
> + case 0x84: /* Time blocks (not BCD encoded) */
> + /* Make it BCD format then ;-) */
> + /* This is an ugly hack. Dunno how to do it correctly for now */
> + data->raw_sms->smsc_time[0] = (block[3] % 10) << 4;
> + for (j = 1; j < block[2]; j++) {
> + data->raw_sms->smsc_time[i] =
> + (block[i+3] / 10) + ((block[i+3] % 10) << 4);
> + }
> + break;
>   default:
>   dprintf("Unknown block of type: %02x!\n", block[0]);
>   break;
>
> take care,
> pkot
> --
> p k o t a t b e z s e n s u d o t p l
> http://www.gnokii.org/
>
>
> _______________________________________________
> gnokii-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/gnokii-users
>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]