[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix EMS + concat message, cleanup gnokii.c
From: |
Pawel Kot |
Subject: |
Re: Fix EMS + concat message, cleanup gnokii.c |
Date: |
Fri, 7 Jun 2002 12:28:57 +0200 (CEST) |
On Fri, 7 Jun 2002, Pavel Machek wrote:
> This fixes concatenated message header in combination with other
> headers.
>
> In gnokii.c it fixes concat+animation case and moves sending ems
> pictures to --sendsms, so sendlogo can be killed in future.
>
> If there are no big complains, I'll commit.
There are.
> diff -u -u -r1.29 gsm-bitmaps.c
> --- common/gsm-bitmaps.c 3 Jun 2002 22:59:48 -0000 1.29
> +++ common/gsm-bitmaps.c 7 Jun 2002 09:51:26 -0000
> @@ -260,7 +267,7 @@
> fprintf(stderr, "EMS needs bitmap size 8, 16, 24, ...
> \n");
> return GE_NOTSUPPORTED;
> }
> - message[current++] = bitmap->width/8*bitmap->height+5;
> + current += AddUDH(rawsms, bitmap->width/8*bitmap->height+5);
> message[current++] = 0x12; /* Picture code */
> message[current++] = bitmap->width/8*bitmap->height+3; /*
> Picture size */;
> message[current++] = 0; /* Position in text this
> picture is at */
> @@ -269,7 +276,7 @@
> break;
> case GSM_EMSAnimation:
> dprintf("EMS animation\n");
> - message[current++] = 128+3;
> + current += AddUDH(rawsms, 128+3);
> message[current++] = 0x0e; /* Animation code */
> message[current++] = 128+1; /* Picture size */;
> message[current++] = 0x00; /* Position where to display */
Bitmaps know NOTHING about UDH. Don't mess it.
> diff -u -u -r1.11 gsm-ringtones.c
> --- common/gsm-ringtones.c 23 May 2002 09:59:20 -0000 1.11
> +++ common/gsm-ringtones.c 7 Jun 2002 09:51:30 -0000
> @@ -586,12 +586,12 @@
> }
>
> /* Returns message length */
> -int GSM_EncodeSMSiMelody(char *imelody, char *message)
> +int GSM_EncodeSMSiMelody(GSM_SMSMessage *rawsms, char *imelody, char
> *message)
> {
> unsigned short size, current = 0;
>
> dprintf("EMS iMelody\n");
> - message[current++] = strlen(imelody)+3;
> + current += AddUDH(rawsms, strlen(imelody)+3);
> message[current++] = 0x0c; /* iMelody code */
> message[current++] = strlen(imelody)+1;
> message[current++] = 0; /* Position in text this melody
> is at */
Rhingtones also know NOTHING about UDH. That is SMS who cares about adding
UDH. Not bitmap or ringtone.
> +int AddUDH(GSM_SMSMessage *rawsms, int length)
> +{
> + rawsms->UserData[0] += length;
> + if (!rawsms->UDHIndicator) {
> + rawsms->UDHIndicator = 1;
> + return 1;
> + }
> + return 0;
> +}
This is AddUDHIndicator, not AddUDH.
> diff -u -u -r1.16 gsm-bitmaps.h
> --- include/gsm-bitmaps.h 3 Jun 2002 20:30:43 -0000 1.16
> +++ include/gsm-bitmaps.h 7 Jun 2002 09:52:14 -0000
> @@ -76,7 +76,6 @@
> API void GSM_PrintBitmap(GSM_Bitmap *bitmap);
>
> /* SMS bitmap functions */
> -int GSM_EncodeSMSBitmap(GSM_Bitmap *bitmap, char *message);
Why?
pkot
--
mailto:address@hidden :: mailto:address@hidden
http://kt.linuxnews.pl/ :: Kernel Traffic po polsku
- Fix EMS + concat message, cleanup gnokii.c, Pavel Machek, 2002/06/07
- Re: Fix EMS + concat message, cleanup gnokii.c,
Pawel Kot <=
- Re: Fix EMS + concat message, cleanup gnokii.c, Pavel Machek, 2002/06/08
- Re: Fix EMS + concat message, cleanup gnokii.c, Pawel Kot, 2002/06/08
- Re: Fix EMS + concat message, cleanup gnokii.c, Pavel Machek, 2002/06/08
- Re: Fix EMS + concat message, cleanup gnokii.c, Pawel Kot, 2002/06/08
- Re: Fix EMS + concat message, cleanup gnokii.c, Pavel Machek, 2002/06/08
- Re: Fix EMS + concat message, cleanup gnokii.c, Pawel Kot, 2002/06/08
- Re: Fix EMS + concat message, cleanup gnokii.c, Pavel Machek, 2002/06/10
- Re: Fix EMS + concat message, cleanup gnokii.c, Pawel Kot, 2002/06/10
- Re: Fix EMS + concat message, cleanup gnokii.c, Pavel Machek, 2002/06/12
- Re: Fix EMS + concat message, cleanup gnokii.c, Pawel Kot, 2002/06/12