Github user mike-jumper commented on a diff in the pull request:
https://github.com/apache/guacamole-server/pull/205#discussion_r236553937
--- Diff: src/guacd/conf-args.c ---
@@ -122,3 +128,15 @@ int guacd_conf_parse_args(guacd_config* config, int
argc, char** argv) {
}
+const char* guacd_conf_get_path(int argc, char** argv) {
+
+ /* Find -c option */
+ int i;
+ for(i=1; i<argc-1; i++) {
+ if(strcmp("-c", argv[i]) == 0) return argv[i+1];
--- End diff --
Manually re-parsing the command line arguments seems a poor approach. Why
not parse within `guacd_conf_parse_args()` fully leveraging `getopt()`?
Couldn't this setting live on the `guacd_config` struct like the others?
---