X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-starlingx%2Fmeta-stx-distro%2Frecipes-security%2Fgssproxy%2Ffiles%2FFix-error-handling-in-gp_config_from_dir.patch;fp=meta-starlingx%2Fmeta-stx-distro%2Frecipes-security%2Fgssproxy%2Ffiles%2FFix-error-handling-in-gp_config_from_dir.patch;h=0000000000000000000000000000000000000000;hb=6fc6934434f70595536a387ece31bc30141cafb5;hp=a3c43ae485b08335c29b1ed32f69247f5f8b7735;hpb=eb1e26510491ba49de693ab3b0498edcb06be6c5;p=pti%2Frtp.git diff --git a/meta-starlingx/meta-stx-distro/recipes-security/gssproxy/files/Fix-error-handling-in-gp_config_from_dir.patch b/meta-starlingx/meta-stx-distro/recipes-security/gssproxy/files/Fix-error-handling-in-gp_config_from_dir.patch deleted file mode 100644 index a3c43ae..0000000 --- a/meta-starlingx/meta-stx-distro/recipes-security/gssproxy/files/Fix-error-handling-in-gp_config_from_dir.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 8603c619ca9bc923534d83ee432ddd756f285d4c Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Wed, 12 Jul 2017 09:26:52 -0400 -Subject: [PATCH] Fix error handling in gp_config_from_dir - -Signed-off-by: Alexander Scheel -[rharwood@redhat.com: c99, refactor some existing code] -Reviewed-by: Robbie Harwood -Merges: #204 -(cherry picked from commit eb880e93ed4a48c67ac27b4d5194f0f7786da83e) ---- - 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 8fd60a3..07f7c8d 100644 ---- a/proxy/src/gp_config.c -+++ b/proxy/src/gp_config.c -@@ -798,17 +798,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; - } -