From 71e1aecf9d8f48544e7e3c06ce5084941136b9c1 Mon Sep 17 00:00:00 2001 From: Tom Scavo Date: Fri, 11 Nov 2016 16:23:46 -0500 Subject: [PATCH] Fix print bug --- bin/check_idp_error_urls.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/bin/check_idp_error_urls.sh b/bin/check_idp_error_urls.sh index 0d79fc4..8a68e46 100755 --- a/bin/check_idp_error_urls.sh +++ b/bin/check_idp_error_urls.sh @@ -466,14 +466,12 @@ init_out_files () { COMPATIBILITY_SCRIPT } -print_entity_names_logfile () { +print_idp_names_logfile () { $DO_NOT_PRINT_FILES && return - local statusCode=$1 - local responseCode=$2 - local names=$3 + local names=$1 - printf "%s\t%s\t%s\n" "$statusCode" "$responseCode" "$names" >> "$IDP_NAMES_FILE" + printf "%s\n" "$names" >> "$IDP_NAMES_FILE" } print_no_idp_role_logfile () { @@ -494,7 +492,7 @@ print_no_error_url_logfile () { printf "%s %s\n" "$entityID" "$registrarID" >> "$NO_ERROR_URL_FILE" } -print_error_url_logfile () { +print_idp_error_url_logfile () { $DO_NOT_PRINT_FILES && return local logfile=$1 @@ -563,7 +561,7 @@ $verbose_mode && printf "$script_name using curl opts: %s\n" "$curl_opts" echo "ERROR: $script_name: unable to extract IdP names for entityID: $entityID" >&2 continue fi - echo "$names" >> "$IDP_NAMES_FILE" + print_idp_names_logfile "$names" # extract the errorURL from the entity descriptor errorURL=$( echo "$entityDescriptor" \ @@ -587,11 +585,8 @@ $verbose_mode && printf "$script_name using curl opts: %s\n" "$curl_opts" ) status_code=$? - #response_code=$( echo "$output" | $_SED -e 's/^.*;response:\([^;]*\).*$/\1/' ) - #print_entity_names_logfile "$status_code" "$response_code" "$names" - printf "%s %s %s\n" "$status_code" "$output" "$errorURL" - print_error_url_logfile "$IDP_ERROR_URL_LOG_FILE" + print_idp_error_url_logfile "$IDP_ERROR_URL_LOG_FILE" done exit 0