diff --git a/backend/escl/escl.h b/backend/escl/escl.h index f99bff915..b59a3ff9f 100644 --- a/backend/escl/escl.h +++ b/backend/escl/escl.h @@ -92,7 +92,7 @@ typedef struct { typedef struct ESCL_Device { struct ESCL_Device *next; - double version; + char *version; char *model_name; int port_nb; char *ip_address; diff --git a/backend/escl/escl_capabilities.c b/backend/escl/escl_capabilities.c index efbd54707..2f8089066 100644 --- a/backend/escl/escl_capabilities.c +++ b/backend/escl/escl_capabilities.c @@ -432,7 +432,7 @@ print_xml_c(xmlNode *node, ESCL_Device *device, capabilities_t *scanner, int typ } if (!strcmp((const char *)node->name, "Version")&& node->ns && node->ns->prefix){ if (!strcmp((const char*)node->ns->prefix, "pwg")) - device->version = atof ((const char *)xmlNodeGetContent(node)); + device->version = strdup((const char *)xmlNodeGetContent(node)); } if (!strcmp((const char *)node->name, "MakeAndModel")){ device->model_name = strdup((const char *)xmlNodeGetContent(node)); @@ -588,7 +588,6 @@ escl_capabilities(ESCL_Device *device, char *blacklist, SANE_Status *status) strstr(header->memory, "Server: HP_Compact_Server")) device->hack = curl_slist_append(NULL, "Host: localhost"); - device->version = 0.0; scanner->source = 0; scanner->Sources = (SANE_String_Const *)malloc(sizeof(SANE_String_Const) * 4); for (i = 0; i < 4; i++) diff --git a/backend/escl/escl_newjob.c b/backend/escl/escl_newjob.c index e1b326fbd..5e3568cda 100644 --- a/backend/escl/escl_newjob.c +++ b/backend/escl/escl_newjob.c @@ -46,7 +46,7 @@ struct downloading static const char settings[] = "" \ "" \ - " %.2f" \ + " %s" \ " " \ " " \ " escl:ThreeHundredthsOfInches" \ @@ -187,7 +187,7 @@ escl_newjob (capabilities_t *scanner, const ESCL_Device *device, SANE_Status *st scanner->caps[scanner->source].default_format = strdup(scanner->caps[scanner->source].DocumentFormats[have_pdf]); } - if (device->version <= 2.0) + if (atof ((const char *)device->version) <= 2.0) { // For eSCL 2.0 and older clients snprintf(f_ext_tmp, sizeof(f_ext_tmp),