gnokii-users
[Top][All Lists]
Advanced

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

Re: [PATCH] Re: Encoding in atgen.c


From: Hugo Haas
Subject: Re: [PATCH] Re: Encoding in atgen.c
Date: Mon, 28 Jun 2004 13:11:42 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

* Pawel Kot <address@hidden> [2004-06-28 00:09:47+0200]:
> On Sat, 26 Jun 2004, Hugo Haas wrote:
>
>> I have implemented my encoding fix based on the data below:
> [...]
>> I have added an encode_everything boolean in the AT phone driver
>> information. By default, it's set to 0, and is set to 1 for phones
>> declaring themselves as "SONY ERICSSON". I believe that T610's need
>> this to communicate with Gnokii, and it doesn't break the
>> communication with the T68i.
>>
>> When drvinst->encode_everything is set, all strings between double
>> quotes are encoded and decoded, i.e. names, phone numbers and memory
>> types instead of just names.
>>
>> The patch is attached. It is essentially the patch I sent for 0.6.1[1]
>> with its effects only applied to Sony Ericsson phones. Let me know if
>> this is acceptable for inclusion.
>
> You have changed the behaviour for the following functions:
>  - at_memory_type_set()
>  - AT_WritePhonebook()
>  - ReplyReadPhonebook()
> Are really only these functions affected? What about SMS functions? What
> about divert functions? What about security codes?

That's a good question. As I only use Gnokii for keeping the address
book in sync with my PDA's, I haven't tried any other, but I think
that the behavior is as follows AFAICS: all strings between double
quotes are encoded. I would not expect this to be limited to the
address book.

I'm wondering if the right approach would be to have a
encode-double-quote() function that would take a string as an argument
and return the same string between double quotes, encoded if
necessary, decode-double-quote() doing the decoding.

> And really, I'd *much* prefer to have it in ateric.c (instead of
> encode_everything field).

I had started going this way when I discovered that ateric.c functions
were for "ericsson" phones and that my T610 was declaring the maker as
"SONY ERICSSON". Basically, it doesn't use the ateric.c functions, and
apart from the encoding problem, it seems to work.

So I thought that using drvinst and just do one test in the
initialization function may be the best way forward.

Other options include making ateric.c functions apply to
SonyEricssons, maybe with some tests to differentiate with old
Ericsson phones, or maybe create an atse.c with functions for the
SonyEricsson.

I think that it's worth noting though that it's just a string encoding
difference, so the change of behavior is small compared to atgen.c's.

> And this is the last thing that stops me before releasing 0.6.2. There
> were really lot of changes since the previous one, but I'd really like to
> have SonyEricssons to work nicely with gnokii 0.6.2.

This is great news as I'd really like to have Gnokii work out of the
box for me. ;-)

Regards,

Hugo

-- 
Hugo Haas - http://larve.net/people/hugo/





reply via email to

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