Changeset 223


Ignore:
Timestamp:
Apr 8, 2006, 4:41:32 PM (16 years ago)
Author:
titer
Message:

The dictionary can start with any field

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/simple_http_parsing/libtransmission/tracker.c

    r222 r223  
    422422
    423423    /* Find the beginning of the dictionary */
    424     for( i = 0; i < bodylen - 18; i++ )
    425     {
    426         /* Hem */
    427         if( !memcmp( &body[i], "d8:interval", 11 ) ||
    428             !memcmp( &body[i], "d8:complete", 11 ) ||
    429             !memcmp( &body[i], "d14:failure reason", 18 ) )
    430         {
     424    for( i = 0; i < bodylen; i++ )
     425    {
     426        if( body[i] == 'd' )
     427        {
     428            /* This must be it */
    431429            break;
    432430        }
    433431    }
    434432
    435     if( i >= bodylen - 18 )
     433    if( i >= bodylen )
    436434    {
    437435        if( tc->stopped || 0 < tc->newPort )
Note: See TracChangeset for help on using the changeset viewer.