Revision 15d2a12c

View differences:

ratecontrol.c
16 16
#define MAX(A,B)    ((A)>(B) ? (A) : (B))
17 17
#define MIN(A,B)    ((A)<(B) ? (A) : (B))
18 18

  
19
bool autotune_period = false;
20

  
19 21
static double offer_accept = 1;
20 22
static double acc_to_ack = 0;
21 23

  
......
101 103
{
102 104
  reg_queue_delay(t);
103 105
  acc_to_ack = t;
104
  update_period();
106
  if (autotune_period) {
107
    update_period();
108
  }
105 109
}
106 110

  
107 111

  
streamer.c
72 72
extern bool topo_in;
73 73
extern bool topo_keep_best;
74 74
extern bool topo_add_best;
75
extern bool autotune_period;
75 76

  
76 77
#ifndef MONL
77 78
extern struct timeval print_tdiff;
......
115 116
    "\t[--topo_bidir]: peers choose both in- and out-neighbours (bidir)\n"
116 117
    "\t[--topo_keep_best]: keep best peers, not random subset\n"
117 118
    "\t[--topo_add_best]: add best peers among desired ones, not random subset\n"
119
    "\t[--autotune_period]: automatically tune output bandwidth\n"
118 120
    "\n"
119 121
    "Special Source Peer options\n"
120 122
    "\t[-m chunks]: set the number of copies the source injects in the overlay.\n"
......
194 196
        {"topo_bidir", no_argument, 0, 0},
195 197
        {"topo_keep_best", no_argument, 0, 0},
196 198
        {"topo_add_best", no_argument, 0, 0},
199
        {"autotune_period", no_argument, 0, 0},
197 200
	{0, 0, 0, 0}
198 201
  };
199 202

  
......
215 218
        else if( strcmp( "topo_bidir", long_options[option_index].name ) == 0 ) { topo_in = true; topo_out = true; }
216 219
        else if( strcmp( "topo_keep_best", long_options[option_index].name ) == 0 ) { topo_keep_best = true; }
217 220
        else if( strcmp( "topo_add_best", long_options[option_index].name ) == 0 ) { topo_add_best = true; }
221
        else if( strcmp( "autotune_period", long_options[option_index].name ) == 0 ) { autotune_period = true; }
218 222
        break;
219 223
      case 'a':
220 224
        alpha_target = (double)atoi(optarg) / 100.0;

Also available in: Unified diff