mike-jumper commented on a change in pull request #205:
URL: https://github.com/apache/guacamole-server/pull/205#discussion_r575723305
##########
File path: src/guacd/conf-file.h
##########
@@ -24,6 +24,11 @@
#include "conf.h"
+/**
+ * Creates a new configuration structure, filled with default settings.
+ */
+guacd_config* guacd_conf_create();
Review comment:
Please document the return value of this new function.
##########
File path: src/guacd/conf-file.h
##########
@@ -32,10 +37,17 @@
int guacd_conf_parse_file(guacd_config* conf, int fd);
/**
- * Loads the configuration from any of several default locations, if found. If
- * parsing fails, NULL is returned, and an error message is printed to stderr.
+ * Loads configuration settings from a file with the given path, if found.
+ * On success, zero is returned. If parsing fails, non-zero is returned, and an
+ * error message is printed to stderr.
+ */
+int guacd_conf_load(guacd_config* conf, const char* conf_file_path);
+
+/**
+ * Determines path to the default configuration file (environment variable or
+ * predefined path) and loads settings from it. On success, zero is returned.
*/
-guacd_config* guacd_conf_load();
+int guacd_conf_load_default(guacd_config* conf);
Review comment:
While the functions defined here previously were not documented in this
way, new code should use Doxygen-style comments to document the return values
and parameters accepted by functions.
An example of the style used for new code is:
https://github.com/apache/guacamole-server/blob/ca1fbd5e980392dc91b52ddff473698035d8f357/src/protocols/rdp/keyboard.h#L207-L219
Another example, within guacd:
https://github.com/apache/guacamole-server/blob/ca1fbd5e980392dc91b52ddff473698035d8f357/src/guacd/connection.h#L103-L119
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]