Merge branch 'escl-fix-version' into 'master'

escl: get the eSCL version in the xml

See merge request sane-project/backends!744
sanei_thread_fixup
Ordissimo 2022-08-05 15:51:49 +00:00
commit 8cd1488e3c
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -430,8 +430,9 @@ print_xml_c(xmlNode *node, ESCL_Device *device, capabilities_t *scanner, int typ
if (find_nodes_c(node) && type != -1)
find_true_variables(node, scanner, type);
}
if (!strcmp((const char *)node->name, "Version")){
device->version = atof ((const char *)xmlNodeGetContent(node));
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));
}
if (!strcmp((const char *)node->name, "MakeAndModel")){
device->model_name = strdup((const char *)xmlNodeGetContent(node));
@ -587,6 +588,7 @@ 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++)