On 07/26/2010 01:04 PM, Phil Dibowitz wrote:
> On Sat, Jul 24, 2010 at 07:58:27PM -0600, Stephen Warren wrote:
>> OK. I added the prep_config/finish_config to test.pl and validated that
>> this works on the 700. Updated version is attached.
>
> Thanks!
>
> I did a more thorough look through the code this time. There's only one thing,
> which I've put below.
>
> BTW - Greg accepted the kernel patch, it'll merge into Linus' tree at the next
> merge window.
>
>> Index: libconcord/remote.cpp
>> ===================================================================
>> RCS file: /cvsroot/concordance/concordance/libconcord/remote.cpp,v
>> retrieving revision 1.39
>> diff -u -p -r1.39 remote.cpp
>> --- libconcord/remote.cpp    11 Feb 2009 20:00:13 -0000      1.39
>> +++ libconcord/remote.cpp    25 Jul 2010 01:55:19 -0000
>> @@ -103,7 +103,7 @@ int CRemote::GetIdentity(TRemoteInfo&ri
>>      const unsigned int rx_len = rsp[0]&  0x0F;
>>
>>      if ((rsp[0]&  0xF0) != RESPONSE_VERSION_DATA ||
>> -        (rx_len != 7&&  rx_len != 5)) {
>> +        (rx_len != 5&&  rx_len != 7&&  rx_len != 8)) {
>>              debug("Bogus ident response: %02X", rsp[1]);
>>              return LC_ERROR_INVALID_DATA_FROM_REMOTE;
>>      }
>> @@ -117,7 +117,13 @@ int CRemote::GetIdentity(TRemoteInfo&ri
>>      ri.architecture = rx_len<  6 ? 2 : rsp[5]>>  4;
>>      ri.fw_type = rx_len<  6 ? 0 : rsp[5]&  0x0F;
>>      ri.skin = rx_len<  6 ? 2 : rsp[6];
>> -    ri.protocol = rx_len<  7 ? 0 : rsp[7];
>> +    if (rx_len<  7) {
>> +            ri.protocol = 0;
>> +    } else if (rx_len<  8) {
>> +            ri.protocol = rsp[7];
>> +    } else {
>> +            ri.protocol = ri.architecture;
>> +    }
>
> Wait, this doesn't seem right. protocol is a binary field which either says to
> use one rxlenmap or another, and also to determine if the max_chunk_len for
> reading flash is 700 or 1022. So in the case of the 700 your making it 14, 
> which
> will have the same effect as '1', but isn't quite what we want either.
>
> Am I completely missing something here?

Yes, this is a little odd. However, IIRC, this matches what the official 
software prints. Or perhaps it doesn't print the value, but some field 
in the HTTP responses is the value of ri.protocol at least in 
libconcord, and the offical software sends 14 here. I don't think the 
value of ri.protocol is solely 0 or 1 on existing remotes?

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to