Changeset 7 for trunk/libtransmission


Ignore:
Timestamp:
Jan 12, 2006, 6:40:47 PM (16 years ago)
Author:
root
Message:

Update 2005-11-24

Location:
trunk/libtransmission
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/transmission.c

    r6 r7  
    6666    h->fdlimit = tr_fdInit();
    6767
    68     h->bindPort = 9090;
     68    h->bindPort = TR_DEFAULT_PORT;
    6969
    7070    snprintf( h->prefsDirectory, sizeof( h->prefsDirectory ),
  • trunk/libtransmission/transmission.h

    r6 r7  
    3030#define TR_MAX_TORRENT_COUNT 50
    3131
     32#define TR_DEFAULT_PORT      9090
     33
    3234/***********************************************************************
    3335 * tr_init
  • trunk/libtransmission/upload.c

    r1 r7  
    102102        now  = tr_date();
    103103
    104         /* Check the last four times we sent something and decide if
     104        /* Check the last FOO times we sent something and decide if
    105105           we must wait */
    106106        for( i = 0; i < FOO; i++ )
    107107        {
    108108            size += u->sizes[i];
    109             if( (uint64_t) size < 1024ULL *
    110                     u->limit * ( now - u->dates[i] ) / 1000 )
     109            if( (uint64_t) size * 1000 <
     110                    ( now - u->dates[i] ) * u->limit * 1024 )
    111111            {
    112112                ret = 1;
  • trunk/libtransmission/utils.h

    r3 r7  
    4343    struct timeval tv;
    4444    gettimeofday( &tv, NULL );
    45     return( (uint64_t) tv.tv_sec * 1000 + (uint64_t) tv.tv_usec / 1000 );
     45    return (uint64_t) tv.tv_sec * 1000 + ( tv.tv_usec / 1000 );
    4646}
    4747
Note: See TracChangeset for help on using the changeset viewer.