Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/guacamole-server/pull/205#discussion_r236387468
  
    --- 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];
    +    }
    +
    +    /* Not found */
    +    return NULL;
    --- End diff --
    
    See comments below, but I would argue for making this function return 
either the path provided on the command line with the `-c /path/to/config/file` 
argument, or the `GUACD_CONF_FILE` constant.


---

Reply via email to