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 19 Oct 2004 21:18:59 -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] & 0x0f) % 10) << 4; + for (j = 1; j < block[2]; j++) { + data->raw_sms->smsc_time[j] = + (block[j+3] / 10) + ((block[j+3] % 10) << 4); + } + break; default: dprintf("Unknown block of type: %02x!\n", block[0]); break;