diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2022-02-01 15:25:04 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2022-02-01 15:25:04 +0100 |
commit | 8e5d399808d2270ae9d56c96560a021e594d18a4 (patch) | |
tree | cb83e4c8216cf0e8bcaa17a6f2cb64cf4d7f469a /backend/escl/escl_newjob.c | |
parent | 97e55bdc5cdf59304af739e65f416320bcbcf599 (diff) | |
parent | 302276dc1b90cfc972fb726ca94a23b18f4b0088 (diff) |
Update upstream source from tag 'upstream/1.1.1'
Update to upstream version '1.1.1'
with Debian dir 4cb81ae9eaa2503b9c320ac1e8125f9df6e7f7b3
Diffstat (limited to 'backend/escl/escl_newjob.c')
-rw-r--r-- | backend/escl/escl_newjob.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/escl/escl_newjob.c b/backend/escl/escl_newjob.c index 24bfbc9..98a953f 100644 --- a/backend/escl/escl_newjob.c +++ b/backend/escl/escl_newjob.c @@ -277,6 +277,8 @@ wake_up_device: curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDSIZE, upload->size); curl_easy_setopt(curl_handle, CURLOPT_HEADERFUNCTION, download_callback); curl_easy_setopt(curl_handle, CURLOPT_HEADERDATA, (void *)download); + curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1L); + curl_easy_setopt(curl_handle, CURLOPT_MAXREDIRS, 3L); CURLcode res = curl_easy_perform(curl_handle); if (res != CURLE_OK) { DBG( 1, "Create NewJob : the scanner responded incorrectly: %s\n", curl_easy_strerror(res)); @@ -296,7 +298,17 @@ wake_up_device: result = strdup(location); DBG( 1, "Create NewJob : %s\n", result); *temporary = '\n'; + *location = '\0'; + location = strrchr(tmp_location,'/'); wakup_count = 0; + if (location) { + location++; + scanner->scanJob = strdup(location); + DBG( 1, "Full location header [%s]\n", scanner->scanJob); + } + else + scanner->scanJob = strdup("ScanJobs"); + *location = '/'; } } if (result == NULL) { |