This is an automated email from the git hooks/post-receive script.
rharwood pushed a commit to branch master
in repository gssproxy.
commit eb880e93ed4a48c67ac27b4d5194f0f7786da83e
Author: Alexander Scheel <ascheel(a)redhat.com>
Date: Wed Jul 12 09:26:52 2017 -0400
Fix error handling in gp_config_from_dir
Signed-off-by: Alexander Scheel <ascheel(a)redhat.com>
[rharwood(a)redhat.com: c99, refactor some existing code]
Reviewed-by: Robbie Harwood <rharwood(a)redhat.com>
Merges: #204
---
proxy/src/gp_config.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/proxy/src/gp_config.c b/proxy/src/gp_config.c
index 8ea49d2..721598f 100644
--- a/proxy/src/gp_config.c
+++ b/proxy/src/gp_config.c
@@ -823,17 +823,21 @@ static int gp_config_from_dir(const char *config_dir,
&error_list,
NULL);
if (ret) {
- if (error_list) {
- uint32_t i;
- uint32_t len = ref_array_getlen(error_list, &i);
- for (i = 0; i < len; i++) {
- GPDEBUG("Error when reading config directory: %s\n",
- (const char *) ref_array_get(error_list, i, NULL));
- }
- ref_array_destroy(error_list);
- } else {
- GPDEBUG("Error when reading config directory number: %d\n", ret);
+ uint32_t len;
+
+ if (!error_list) {
+ GPAUDIT("Error when reading config directory number: %d\n", ret);
+ return ret;
}
+
+ len = ref_array_len(error_list);
+ for (uint32_t i = 0; i < len; i++) {
+ /* libini has an unfixable bug where error strings are (char **) */
+ GPAUDIT("Error when reading config directory: %s\n",
+ *(char **)ref_array_get(error_list, i, NULL));
+ }
+
+ ref_array_destroy(error_list);
return ret;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.