summaryrefslogtreecommitdiffstats
path: root/lib/adei/adei.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/adei/adei.sh')
-rw-r--r--lib/adei/adei.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/adei/adei.sh b/lib/adei/adei.sh
index 8519af7..fa9dfc3 100644
--- a/lib/adei/adei.sh
+++ b/lib/adei/adei.sh
@@ -35,7 +35,6 @@ function adei_query {
url="$1&mysql=master"
fi
-
resp=$(curl --proxy "" --location-trusted -sf -m "$timeout" "$url"); err=$?
if [ $err -ne 0 ]; then
resp=$(adei_query "$1" "ecode" "$timeout")
@@ -56,9 +55,10 @@ function adei_query {
function adei_format_query {
local with_auth="${1:-1}"
local query="$2"
- local timeout=${3:-$adei_default_timeout}
- local source=${4:-"$adei_source"}
- local url="${5:-$adei_url}"
+ local database=${3:-master} # ignoring here, it will be handled separately by adei_query
+ local timeout=${4:-$adei_default_timeout}
+ local source=${5:-"$adei_source"}
+ local url="${6:-$adei_url}"
auth=""
[ $with_auth -gt 0 ] && auth="$adei_auth"
@@ -71,7 +71,8 @@ function adei_format_query {
function adei_simple_query {
local req=$(adei_format_query 1 "$@")
- adei_query "$req" "master" "$timeout"; err=$?
+ local database=${2:-master}
+ adei_query "$req" $database "$timeout"; err=$?
return $err
}