diff --git a/daemon/main.c b/daemon/main.c index b45fda146..a5ea823d6 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -625,7 +625,7 @@ static void options(int *argc, char ***argv, GHashTable *templates) { { "homer-disable-rtcp-stats", 0, 0, G_OPTION_ARG_NONE, &rtpe_config.homer_rtcp_off, "Disable RTCP stats tracing to Homer (enabled by default if homer server enabled)", NULL }, { "homer-enable-ng", 0, 0, G_OPTION_ARG_NONE, &rtpe_config.homer_ng_on, "Enable NG tracing to Homer", NULL }, { "homer-ng-capture-proto", 0, 0, G_OPTION_ARG_INT, &rtpe_config.homer_ng_capt_proto, "'Capture protocol type' to use within the HEP protocol (default is 0x3d). Further used by the Homer capture and UI.", "UINT8" }, - { "recording-dir", 0, 0, G_OPTION_ARG_STRING, &rtpe_config.spooldir, "Directory for storing pcap and metadata files", "FILE" }, + { "recording-dir", 0, 0, G_OPTION_ARG_FILENAME, &rtpe_config.spooldir, "Directory for storing pcap and metadata files", "FILE" }, { "recording-method",0, 0, G_OPTION_ARG_STRING, &rtpe_config.rec_method, "Strategy for call recording", "pcap|proc|all" }, { "recording-format",0, 0, G_OPTION_ARG_STRING, &rtpe_config.rec_format, "File format for stored pcap files", "raw|eth" }, { "record-egress",0, 0, G_OPTION_ARG_NONE, &rtpe_config.rec_egress, "Recording egress media instead of ingress", NULL }, @@ -655,8 +655,8 @@ static void options(int *argc, char ***argv, GHashTable *templates) { { "dtls-signature",0, 0,G_OPTION_ARG_STRING, &dtls_sig, "Signature algorithm for DTLS", "SHA-256|SHA-1" }, { "listen-http", 0,0, G_OPTION_ARG_STRING_ARRAY,&rtpe_config.http_ifs,"Interface for HTTP and WS", "[IP46|HOSTNAME:]PORT"}, { "listen-https", 0,0, G_OPTION_ARG_STRING_ARRAY,&rtpe_config.https_ifs,"Interface for HTTPS and WSS", "[IP46|HOSTNAME:]PORT"}, - { "https-cert", 0,0, G_OPTION_ARG_STRING, &rtpe_config.https_cert,"Certificate for HTTPS and WSS","FILE"}, - { "https-key", 0,0, G_OPTION_ARG_STRING, &rtpe_config.https_key, "Private key for HTTPS and WSS","FILE"}, + { "https-cert", 0,0, G_OPTION_ARG_FILENAME, &rtpe_config.https_cert,"Certificate for HTTPS and WSS","FILE"}, + { "https-key", 0,0, G_OPTION_ARG_FILENAME, &rtpe_config.https_key, "Private key for HTTPS and WSS","FILE"}, { "http-threads", 0,0, G_OPTION_ARG_INT, &rtpe_config.http_threads,"Number of worker threads for HTTP and WS","INT"}, { "software-id", 0,0, G_OPTION_ARG_STRING, &rtpe_config.software_id,"Identification string of this software presented to external systems","STRING"}, { "poller-per-thread", 0,0, G_OPTION_ARG_NONE, &rtpe_config.poller_per_thread, "Use poller per thread", NULL }, @@ -689,10 +689,10 @@ static void options(int *argc, char ***argv, GHashTable *templates) { { "mqtt-keepalive",0,0, G_OPTION_ARG_INT, &rtpe_config.mqtt_keepalive,"Seconds between mosquitto keepalives","INT"}, { "mqtt-user",0,0, G_OPTION_ARG_STRING, &rtpe_config.mqtt_user, "Username for mosquitto auth", "USERNAME"}, { "mqtt-pass",0,0, G_OPTION_ARG_STRING, &rtpe_config.mqtt_pass, "Password for mosquitto auth", "PASSWORD"}, - { "mqtt-cafile",0,0, G_OPTION_ARG_STRING, &rtpe_config.mqtt_cafile,"CA file for mosquitto auth", "FILE"}, - { "mqtt-capath",0,0, G_OPTION_ARG_STRING, &rtpe_config.mqtt_capath,"CA path for mosquitto auth", "PATH"}, - { "mqtt-certfile",0,0, G_OPTION_ARG_STRING, &rtpe_config.mqtt_certfile,"Certificate file for mosquitto auth","FILE"}, - { "mqtt-keyfile",0,0, G_OPTION_ARG_STRING, &rtpe_config.mqtt_keyfile,"Key file for mosquitto auth", "FILE"}, + { "mqtt-cafile",0,0, G_OPTION_ARG_FILENAME, &rtpe_config.mqtt_cafile,"CA file for mosquitto auth", "FILE"}, + { "mqtt-capath",0,0, G_OPTION_ARG_FILENAME, &rtpe_config.mqtt_capath,"CA path for mosquitto auth", "PATH"}, + { "mqtt-certfile",0,0, G_OPTION_ARG_FILENAME, &rtpe_config.mqtt_certfile,"Certificate file for mosquitto auth","FILE"}, + { "mqtt-keyfile",0,0, G_OPTION_ARG_FILENAME, &rtpe_config.mqtt_keyfile,"Key file for mosquitto auth", "FILE"}, { "mqtt-publish-qos",0,0,G_OPTION_ARG_INT, &rtpe_config.mqtt_publish_qos,"Mosquitto publish QoS", "0|1|2"}, { "mqtt-publish-topic",0,0,G_OPTION_ARG_STRING, &rtpe_config.mqtt_publish_topic,"Mosquitto publish topic", "STRING"}, { "mqtt-publish-interval",0,0,G_OPTION_ARG_INT, &rtpe_config.mqtt_publish_interval,"Publish timer interval", "MILLISECONDS"}, diff --git a/lib/auxlib.c b/lib/auxlib.c index 36bc4bc60..59781f887 100644 --- a/lib/auxlib.c +++ b/lib/auxlib.c @@ -209,7 +209,7 @@ void config_load_ext(int *argc, char ***argv, GOptionEntry *app_entries, const c GOptionEntry shared_options[] = { { "version", 'v', 0, G_OPTION_ARG_NONE, &version, "Print build time and exit", NULL }, - { "config-file", 0, 0, G_OPTION_ARG_STRING, &rtpe_common_config_ptr->config_file, "Load config from this file", "FILE" }, + { "config-file", 0, 0, G_OPTION_ARG_FILENAME, &rtpe_common_config_ptr->config_file, "Load config from this file", "FILE" }, { "config-section", 0, 0, G_OPTION_ARG_STRING, &rtpe_common_config_ptr->config_section,"Config file section to use", "STRING" }, { "log-facility", 0, 0, G_OPTION_ARG_STRING, &rtpe_common_config_ptr->log_facility, "Syslog facility to use for logging", "daemon|local0|...|local7"}, { "log-level", 'L', 0, G_OPTION_ARG_INT, &rtpe_common_config_ptr->default_log_level,"Default log level", "INT" }, diff --git a/recording-daemon/main.c b/recording-daemon/main.c index 1144767b8..da0865c02 100644 --- a/recording-daemon/main.c +++ b/recording-daemon/main.c @@ -196,7 +196,7 @@ static void options(int *argc, char ***argv) { GOptionEntry e[] = { { "table", 't', 0, G_OPTION_ARG_INT, &ktable, "Kernel table rtpengine uses", "INT" }, - { "spool-dir", 0, 0, G_OPTION_ARG_STRING, &spool_dir, "Directory containing rtpengine metadata files", "PATH" }, + { "spool-dir", 0, 0, G_OPTION_ARG_FILENAME, &spool_dir, "Directory containing rtpengine metadata files", "PATH" }, { "num-threads", 0, 0, G_OPTION_ARG_INT, &num_threads, "Number of worker threads", "INT" }, { "output-storage", 0, 0, G_OPTION_ARG_STRING, &os_str, "Where to store audio streams", "file|db|both" }, { "output-dir", 0, 0, G_OPTION_ARG_STRING, &output_dir, "Where to write media files to", "PATH" }, @@ -217,7 +217,7 @@ static void options(int *argc, char ***argv) { { "mysql-user", 0, 0, G_OPTION_ARG_STRING, &c_mysql_user, "MySQL connection credentials", "USERNAME" }, { "mysql-pass", 0, 0, G_OPTION_ARG_STRING, &c_mysql_pass, "MySQL connection credentials", "PASSWORD" }, { "mysql-db", 0, 0, G_OPTION_ARG_STRING, &c_mysql_db, "MySQL database name", "STRING" }, - { "forward-to", 0, 0, G_OPTION_ARG_STRING, &forward_to, "Where to forward to (unix socket)", "PATH" }, + { "forward-to", 0, 0, G_OPTION_ARG_FILENAME, &forward_to, "Where to forward to (unix socket)", "PATH" }, { "tcp-send-to", 0, 0, G_OPTION_ARG_STRING, &tcp_send_to, "Where to send to (TCP destination)", "IP:PORT" }, { "tls-send-to", 0, 0, G_OPTION_ARG_STRING, &tls_send_to, "Where to send to (TLS destination)", "IP:PORT" }, { "tcp-resample", 0, 0, G_OPTION_ARG_INT, &tls_resample, "Sampling rate for TCP/TLS PCM output", "INT" },