summaryrefslogtreecommitdiff
path: root/backend/escl/escl_capabilities.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/escl/escl_capabilities.c')
-rw-r--r--backend/escl/escl_capabilities.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/backend/escl/escl_capabilities.c b/backend/escl/escl_capabilities.c
index 950efaa..05b3fd2 100644
--- a/backend/escl/escl_capabilities.c
+++ b/backend/escl/escl_capabilities.c
@@ -48,7 +48,7 @@ header_callback(void *str, size_t size, size_t nmemb, void *userp)
char *content = realloc(header->memory, header->size + realsize + 1);
if (content == NULL) {
- DBG( 1, "Not enough memory (realloc returned NULL)\n");
+ DBG( 10, "Not enough memory (realloc returned NULL)\n");
return (0);
}
header->memory = content;
@@ -201,10 +201,8 @@ find_valor_of_array_variables(xmlNode *node, capabilities_t *scanner, int type)
{
const char *name = (const char *)node->name;
if (strcmp(name, "ColorMode") == 0) {
+#ifndef HAVE_POPPLER_GLIB
const char *color = (SANE_String_Const)xmlNodeGetContent(node);
-#if HAVE_POPPLER_GLIB
- if (type == PLATEN || strcmp(color, "BlackAndWhite1"))
-#else
if (strcmp(color, "BlackAndWhite1"))
#endif
scanner->caps[type].ColorModes = char_to_array(scanner->caps[type].ColorModes, &scanner->caps[type].ColorModesSize, (SANE_String_Const)xmlNodeGetContent(node), 1);
@@ -235,14 +233,14 @@ find_valor_of_array_variables(xmlNode *node, capabilities_t *scanner, int type)
}
#endif
#if(defined HAVE_TIFFIO_H)
- else if(type == PLATEN && !strcmp(scanner->caps[type].DocumentFormats[i], "image/tiff"))
+ else if(!strcmp(scanner->caps[type].DocumentFormats[i], "image/tiff"))
{
have_tiff = SANE_TRUE;
scanner->caps[type].have_tiff = i;
}
#endif
#if HAVE_POPPLER_GLIB
- else if(type == PLATEN && !strcmp(scanner->caps[type].DocumentFormats[i], "application/pdf"))
+ else if(!strcmp(scanner->caps[type].DocumentFormats[i], "application/pdf"))
{
have_pdf = SANE_TRUE;
scanner->caps[type].have_pdf = i;
@@ -568,9 +566,9 @@ escl_capabilities(ESCL_Device *device, char *blacklist, SANE_Status *status)
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 header responded : [%s]\n", header->memory);
+ DBG( 10, "Create NewJob : the scanner header responded : [%s]\n", header->memory);
if (res != CURLE_OK) {
- DBG( 1, "The scanner didn't respond: %s\n", curl_easy_strerror(res));
+ DBG( 10, "The scanner didn't respond: %s\n", curl_easy_strerror(res));
*status = SANE_STATUS_INVAL;
goto clean_data;
}