Ignore:
Timestamp:
Jun 24, 2008, 9:39:07 PM (14 years ago)
Author:
charles
Message:

when getting 5xx errors from a tracker, keep increasing the intervals between retries, instead of hammering the tracker at constant intervals. thanks to mape for this suggestion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpc-server.c

    r6222 r6251  
    3232
    3333#define BUSY_INTERVAL_MSEC 30
    34 #define IDLE_INTERVAL_MSEC 100
    35 #define UNUSED_INTERVAL_MSEC 1000
     34#define IDLE_INTERVAL_MSEC 66
     35#define UNUSED_INTERVAL_MSEC 100
    3636
    3737struct tr_rpc_server
     
    143143        char ports[128];
    144144        char passwd[MAX_PATH_LENGTH];
     145        char clutchDir[MAX_PATH_LENGTH];
     146        char * clutchAlias;
    145147        struct timeval tv = tr_timevalMsec( UNUSED_INTERVAL_MSEC );
     148
     149        tr_buildPath( clutchDir, sizeof( clutchDir ), tr_sessionGetConfigDir( server->session ), "clutch", NULL );
     150        clutchAlias = tr_strdup_printf( "%s=%s", "/transmission/clutch", clutchDir );
    146151
    147152        getPasswordFile( server, passwd, sizeof( passwd ) );
     
    154159        snprintf( ports, sizeof( ports ), "%d", server->port );
    155160        shttpd_register_uri( server->ctx, "/transmission/rpc", handle_rpc, server );
     161        shttpd_set_option(server->ctx, "aliases", clutchAlias );
    156162        shttpd_set_option( server->ctx, "ports", ports );
    157163        shttpd_set_option( server->ctx, "dir_list", "0" );
    158         shttpd_set_option( server->ctx, "root", "/dev/null" );
     164        //shttpd_set_option( server->ctx, "root", "/dev/null" );
    159165        shttpd_set_option( server->ctx, "auth_realm", MY_REALM );
    160166        if( server->acl ) {
     
    170176        evtimer_set( &server->timer, rpcPulse, server );
    171177        evtimer_add( &server->timer, &tv );
     178
     179        tr_free( clutchAlias );
    172180    }
    173181}
Note: See TracChangeset for help on using the changeset viewer.