Skip to content

Commit

Permalink
Fix print bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Scavo committed Nov 11, 2016
1 parent 6925d86 commit 71e1aec
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions bin/check_idp_error_urls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand All @@ -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
Expand Down Expand Up @@ -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" \
Expand All @@ -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

0 comments on commit 71e1aec

Please sign in to comment.