summaryrefslogtreecommitdiff
path: root/backend/escl/escl_capabilities.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-02-12 17:36:29 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-02-12 17:36:29 +0100
commit882fd010527b8d8823f09e19edbed3746265fa08 (patch)
treebe5c7cace6697afc753c152d13ad5145d0884a42 /backend/escl/escl_capabilities.c
parent527bedac30eb120915718eb7997e6dacd583512e (diff)
parente0d94cf4d39395df1e2c6bb4d967200298c13881 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'backend/escl/escl_capabilities.c')
-rw-r--r--backend/escl/escl_capabilities.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/backend/escl/escl_capabilities.c b/backend/escl/escl_capabilities.c
index 7422896..efbd547 100644
--- a/backend/escl/escl_capabilities.c
+++ b/backend/escl/escl_capabilities.c
@@ -325,7 +325,8 @@ print_support(xmlNode *node)
cpt++;
}
else if (!strcmp((const char *)node->name, "Normal")) {
- sup->normal = atoi((const char *)xmlNodeGetContent(node));
+ sup->value = atoi((const char *)xmlNodeGetContent(node));
+ sup->normal = sup->value;
cpt++;
have_norm = 1;
}
@@ -338,7 +339,8 @@ print_support(xmlNode *node)
if (cpt == 4)
return sup;
if (cpt == 3 && have_norm == 0) {
- sup->normal = (sup->max / 2 );
+ sup->value = (sup->max / 2 );
+ sup->normal = sup->value;
return sup;
}
free(sup);
@@ -428,6 +430,10 @@ 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")&& 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));
}
@@ -582,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++)