int bandwidth;
struct hostent* ph;
+ /* If some parameters are not set explicitely, use default values. */
+ if (stream->bandwidth_bps < 0) stream->bandwidth_bps = opt_def_bandwidth;
+ if (stream->packet_size < 0) stream->packet_size = opt_packet_size;
+ if (stream->period_usec < 0) stream->period_usec = opt_def_period_msec;
+
bandwidth = stream->bandwidth_bps;
/* Avoid arithmetic exception. Server thread will exit if
return params;
params = next_char;
} else
- bw = opt_def_bandwidth;
+ bw = -1;
sp->bandwidth_bps = bw*Kbit;
return params;
params = next_char;
} else {
- packet_size = opt_packet_size;
- period = opt_def_period_msec;
+ packet_size = -1;
+ period = -1;
}
}
sp->period_usec = period*MSEC_TO_USEC;