Skip to content

Commit 0666707

Browse files
committed
audio.cpp: removed unused code
Remove the code from the time where there was dual-link sending (for audio, first address was used - addrs were separated by a comma).
1 parent 946df00 commit 0666707

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/audio/audio.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,6 @@ static int
274274
audio_init_real(struct state_audio *s, const struct audio_options *opt,
275275
const struct common_opts *common)
276276
{
277-
char *tmp, *unused = NULL;
278-
char *addr;
279-
280277
assert(opt->send_cfg != NULL);
281278
assert(opt->recv_cfg != NULL);
282279

@@ -326,20 +323,16 @@ audio_init_real(struct state_audio *s, const struct audio_options *opt,
326323
s->opts = *common;
327324

328325
assert(opt->host != nullptr);
329-
tmp = strdup(opt->host);
330326
s->audio_participants = pdb_init("audio", &audio_offset);
331-
addr = strtok_r(tmp, ",", &unused);
332-
assert(addr != nullptr);
333327

334-
s->audio_network_parameters.addr = strdup(addr);
328+
s->audio_network_parameters.addr = strdup(opt->host);
335329
s->audio_network_parameters.recv_port = opt->recv_port;
336330
s->audio_network_parameters.send_port = opt->send_port;
337331
s->audio_network_parameters.participants = s->audio_participants;
338332
s->audio_network_parameters.force_ip_version = common->force_ip_version;
339333
s->audio_network_parameters.mcast_if =
340334
strlen(s->opts.mcast_if) > 0 ? s->opts.mcast_if : nullptr;
341335
s->audio_network_parameters.ttl = s->opts.ttl;
342-
free(tmp);
343336

344337
if (strcmp(opt->send_cfg, "none") != 0) {
345338
const char *cfg = "";

0 commit comments

Comments
 (0)