gnokii-users
[Top][All Lists]
Advanced

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

Re: Multipart Messages


From: Pavel Machek
Subject: Re: Multipart Messages
Date: Fri, 31 May 2002 21:56:31 +0200
User-agent: Mutt/1.3.28i

Hi!

> [...]
>       count = (rawsms->UserDataLength + 127) / 128;
>       printf("Will need %d sms-es\n", count);
>       for (i=0; i<count; i++) {
>               printf("Sending sms #%d\n", i);
>               sms.UserData[0].Type = SMS_MultiData;
>               sms.UserData[0].Length = 128;
>               if (i+1 == count)
>                       sms.UserData[0].Length = rawsms->UserDataLength % 128;
>               memcpy(sms.UserData[0].u.Multi.Binary, rawsms->UserData + 
> i*128, 128);
>               sms.UserData[0].u.Multi.this = i+1;
>               sms.UserData[0].u.Multi.total = count;
>               sms.UserData[1].Type = SMS_NoData;
>               data->SMS = &sms;
>               error = SendSMS(data, state);
>               if (error != GE_NONE) return error;
>       }
>       return GE_NONE;
> [...]
> API GSM_Error SendSMS(GSM_Data *data, GSM_Statemachine *state)
> [...]
>       if (data->RawSMS->Length > 171) {
>               printf("SMS is too long? %d\n", data->RawSMS->Length);
>               return SendLongSMS(data, state);
>       }
> [...]
> 
> Please explain:
>  - where did you get "171", "127", "128" from?

Changed 128 into constant so we can easily change it if its
wrong. And... 171 probably *is* wrong :-(.

>  - how do you want to send concatenated messages (plain text
> (default alphabet or unicode) messages with encoded length greater then
> 140 octets, shown by Nokia phones as "Linked #/#"?

I do not have nokia phone here :-(((.
                                                                Pavel
-- 
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.



reply via email to

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