Changeset 7254


Ignore:
Timestamp:
Dec 3, 2008, 5:34:28 AM (12 years ago)
Author:
charles
Message:

(1.4x libT) #1552: Blocklists fail when Windows newlines are present

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4x/libtransmission/blocklist.c

    r6897 r7254  
    199199
    200200int
    201 _tr_blocklistHasAddress( tr_blocklist *        b,
     201_tr_blocklistHasAddress( tr_blocklist         * b,
    202202                         const struct in_addr * addr )
    203203{
     
    258258    while( !fggets( &line, in ) )
    259259    {
    260         char *             rangeBegin;
    261         char *             rangeEnd;
    262         struct in_addr     in_addr;
     260        char *  rangeBegin;
     261        char *  rangeEnd;
     262        char *  crpos;
     263        struct in_addr in_addr;
    263264        struct tr_ip_range range;
    264265
     
    270271        if( !rangeEnd ){ free( line ); continue; }
    271272        *rangeEnd++ = '\0';
     273
     274        if(( crpos = strchr( rangeEnd, '\r' )))
     275            *crpos = '\0';
    272276
    273277        if( tr_netResolve( rangeBegin, &in_addr ) )
Note: See TracChangeset for help on using the changeset viewer.