@@ -290,7 +290,7 @@ struct state_audio_mixer final {
290
290
struct socket_udp_local *recv_socket{};
291
291
string audio_codec{" PCM" };
292
292
sockaddr_storage
293
- only_sender; // /< if !AF_UNSPEC, use stream just from this sender
293
+ only_sender{} ; // /< if !AF_UNSPEC, use stream just from this sender
294
294
private:
295
295
struct module mod;
296
296
thread thread_id;
@@ -330,14 +330,22 @@ state_audio_mixer::check_messages()
330
330
MSG (INFO, " flushing the address restriction (defaulting to mix all)\n " );
331
331
only_sender.ss_family = AF_UNSPEC;
332
332
} else {
333
- MSG (INFO, " restricting mixer to: %s\n " , val);
334
- only_sender = get_sockaddr (val, 0 );
335
- if (participants.find (only_sender) ==
336
- participants.end ()) {
337
- MSG (WARNING,
338
- " The requested participant %s is not yet "
339
- " present...\n " ,
340
- val);
333
+ struct sockaddr_storage ss = get_sockaddr (val, 0 );
334
+ if (ss.ss_family != AF_UNSPEC) {
335
+ MSG (INFO, " restricting mixer to: %s\n " , val);
336
+ only_sender = ss;
337
+ if (participants.find (only_sender) ==
338
+ participants.end ()) {
339
+ MSG (WARNING,
340
+ " The requested participant %s is "
341
+ " not yet present...\n " , val);
342
+ }
343
+ } else {
344
+ MSG (ERROR, " Wrong addr spec: %s\n " , val);
345
+ free_message (msg,
346
+ new_response (RESPONSE_BAD_REQUEST,
347
+ nullptr ));
348
+ continue ;
341
349
}
342
350
}
343
351
0 commit comments