Ignore:
Timestamp:
May 29, 2009, 7:17:12 PM (13 years ago)
Author:
charles
Message:

(trunk libT) re-start work on making libT doxygen friendly. still a long ways to go on this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/clients.c

    r8441 r8561  
    413413    if( !*buf )
    414414    {
    415         struct evbuffer * out = tr_getBuffer( );
     415        char out[32], *walk=out;
    416416        const char *in, *in_end;
    417417        for( in=(const char*)id, in_end=in+8; in!=in_end; ++in ) {
    418418            if( isprint( *in ) )
    419                 evbuffer_add_printf( out, "%c", *in );
    420             else
    421                 evbuffer_add_printf( out, "%%%02X", (unsigned int)*in );
    422         }
    423 
    424         tr_strlcpy( buf, EVBUFFER_DATA( out ), buflen );
    425         tr_releaseBuffer( out );
    426     }
    427 }
     419                *walk++ = *in;
     420            else {
     421                tr_snprintf( walk, out+sizeof(out)-walk, "%%%02X", (unsigned int)*in );
     422                walk += 3;
     423            }
     424        }
     425        *walk = '\0';
     426        tr_strlcpy( buf, out, buflen );
     427    }
     428}
Note: See TracChangeset for help on using the changeset viewer.