From 26d057f83b510ccaaf62f88fc86e6187ccf16f83 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 3 Oct 2014 00:38:17 +0200 Subject: fixed warning for pointless parameter combinations --- src/options.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/options.c b/src/options.c index 7d03d1d..33ffee1 100644 --- a/src/options.c +++ b/src/options.c @@ -315,24 +315,25 @@ static int options_parse_post(options_t* opt) return -3; } - if(opt->rtp_host_ && opt->auto_client_) { - printf("WARNING: you have set a remote RTP host and the automatic client handling is enabled.\n" \ - " Please mind that the remote RTP host is always added as a receiver and it shouldn't be\n" \ - " configured to send keepalives. This would re-add the receiver to the list of clients\n" \ - " and as a result duplicate packages will be sent.\n" \ - " Also the remote RTP host is excluded from client timeout handling and remove requests\n" \ - " will get ignored.\n\n"); - } else if(!opt->rtp_host_ && !opt->auto_client_) { - printf("WARNING: both, the remote RTP host, as well as the automatic client detection are disabled\n" \ - " this means that no streaming will be done. Recording will work but this is most probably\n" \ - " not what you intended - please check your configuration.\n\n"); + if(opt->mode_ == SENDER) { + if(opt->rtp_host_ && opt->auto_client_) { + printf("WARNING: you have set a remote RTP host and the automatic client handling is enabled.\n" \ + " Please mind that the remote RTP host is always added as a receiver and it shouldn't be\n" \ + " configured to send keepalives. This would re-add the receiver to the list of clients\n" \ + " and as a result duplicate packages will be sent.\n" \ + " Also the remote RTP host is excluded from client timeout handling and remove requests\n" \ + " will get ignored.\n\n"); + } else if(!opt->rtp_host_ && !opt->auto_client_) { + printf("WARNING: both, the remote RTP host, as well as the automatic client detection are disabled\n" \ + " this means that no streaming will be done. Recording will work but this is most probably\n" \ + " not what you intended - please check your configuration.\n\n"); + } + + if(opt->rtp_host_reflector_) { + printf("WARNING: The mode of operation is set to sender and the RTP packet reflector has a remote\n" \ + " host configured. Mind that in sender mode the reflector will not be used!\n\n"); + } } - - if(opt->mode_ == SENDER && opt->rtp_host_reflector_) { - printf("WARNING: The mode of operation is set to sender and the RTP packet reflector has a remote\n" \ - " host configured. Mind that in sender mode the reflector will not be used!\n\n"); - } - if(opt->debug_) { opt->daemonize_ = 0; g_strfreev(opt->log_targets_); -- cgit v1.2.3