Ignore:
Timestamp:
Oct 11, 2010, 3:41:27 PM (11 years ago)
Author:
charles
Message:

(trunk libT) #3617 "1000+ warnings of 'inlining failed' in libtransmission when compiled with gcc 4.4.4" -- fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-io.c

    r10931 r11299  
    613613}
    614614
     615const char* tr_peerIoGetAddrStr( const tr_peerIo * io )
     616{
     617    return tr_isPeerIo( io ) ? tr_peerIoAddrStr( &io->addr, io->port ) : "error";
     618}
     619
    615620void
    616621tr_peerIoSetIOFuncs( tr_peerIo        * io,
     
    821826}
    822827
     828void
     829tr_peerIoWriteUint16( tr_peerIo        * io,
     830                      struct evbuffer  * outbuf,
     831                      uint16_t           writeme )
     832{
     833    const uint16_t tmp = htons( writeme );
     834    tr_peerIoWriteBytes( io, outbuf, &tmp, sizeof( uint16_t ) );
     835}
     836
     837void
     838tr_peerIoWriteUint32( tr_peerIo        * io,
     839                      struct evbuffer  * outbuf,
     840                      uint32_t           writeme )
     841{
     842    const uint32_t tmp = htonl( writeme );
     843    tr_peerIoWriteBytes( io, outbuf, &tmp, sizeof( uint32_t ) );
     844}
     845
    823846/***
    824847****
     
    850873            assert( 0 );
    851874    }
     875}
     876
     877void
     878tr_peerIoReadUint16( tr_peerIo        * io,
     879                     struct evbuffer  * inbuf,
     880                     uint16_t         * setme )
     881{
     882    uint16_t tmp;
     883    tr_peerIoReadBytes( io, inbuf, &tmp, sizeof( uint16_t ) );
     884    *setme = ntohs( tmp );
     885}
     886
     887void tr_peerIoReadUint32( tr_peerIo        * io,
     888                          struct evbuffer  * inbuf,
     889                          uint32_t         * setme )
     890{
     891    uint32_t tmp;
     892    tr_peerIoReadBytes( io, inbuf, &tmp, sizeof( uint32_t ) );
     893    *setme = ntohl( tmp );
    852894}
    853895
Note: See TracChangeset for help on using the changeset viewer.