(trunk gtk, qt) #4165 "__FD_SETSIZE impact on open-file-limit and peer-limit-global" -- cap the per-torrent and per-session peer limits at FD_SETSIZE.

This commit is contained in:
Jordan Lee 2011-07-13 19:22:10 +00:00
parent 25db229fa0
commit d634396f98
2 changed files with 4 additions and 4 deletions

View File

@ -1200,9 +1200,9 @@ networkPage( GObject * core )
hig_workarea_add_section_divider( t, &row ); hig_workarea_add_section_divider( t, &row );
hig_workarea_add_section_title( t, &row, _( "Peer Limits" ) ); hig_workarea_add_section_title( t, &row, _( "Peer Limits" ) );
w = new_spin_button( TR_PREFS_KEY_PEER_LIMIT_TORRENT, core, 1, 300, 5 ); w = new_spin_button( TR_PREFS_KEY_PEER_LIMIT_TORRENT, core, 1, FD_SETSIZE, 5 );
hig_workarea_add_row( t, &row, _( "Maximum peers per _torrent:" ), w, NULL ); hig_workarea_add_row( t, &row, _( "Maximum peers per _torrent:" ), w, NULL );
w = new_spin_button( TR_PREFS_KEY_PEER_LIMIT_GLOBAL, core, 1, 3000, 5 ); w = new_spin_button( TR_PREFS_KEY_PEER_LIMIT_GLOBAL, core, 1, FD_SETSIZE, 5 );
hig_workarea_add_row( t, &row, _( "Maximum peers _overall:" ), w, NULL ); hig_workarea_add_row( t, &row, _( "Maximum peers _overall:" ), w, NULL );
hig_workarea_add_section_divider( t, &row ); hig_workarea_add_section_divider( t, &row );

View File

@ -352,8 +352,8 @@ PrefsDialog :: createNetworkTab( )
hig->addSectionDivider( ); hig->addSectionDivider( );
hig->addSectionTitle( tr( "Limits" ) ); hig->addSectionTitle( tr( "Limits" ) );
hig->addRow( tr( "Maximum peers per &torrent:" ), spinBoxNew( Prefs::PEER_LIMIT_TORRENT, 1, 300, 5 ) ); hig->addRow( tr( "Maximum peers per &torrent:" ), spinBoxNew( Prefs::PEER_LIMIT_TORRENT, 1, FD_SETSIZE, 5 ) );
hig->addRow( tr( "Maximum peers &overall:" ), spinBoxNew( Prefs::PEER_LIMIT_GLOBAL, 1, 3000, 5 ) ); hig->addRow( tr( "Maximum peers &overall:" ), spinBoxNew( Prefs::PEER_LIMIT_GLOBAL, 1, FD_SETSIZE, 5 ) );
hig->addSectionDivider( ); hig->addSectionDivider( );
hig->addSectionTitle( tr( "Options" ) ); hig->addSectionTitle( tr( "Options" ) );