kopia lustrzana https://gitlab.com/sane-project/backends
Get the eSCL version in the xml
rodzic
b51a2e9cf2
commit
23c7290931
|
@ -430,7 +430,8 @@ print_xml_c(xmlNode *node, ESCL_Device *device, capabilities_t *scanner, int typ
|
||||||
if (find_nodes_c(node) && type != -1)
|
if (find_nodes_c(node) && type != -1)
|
||||||
find_true_variables(node, scanner, type);
|
find_true_variables(node, scanner, type);
|
||||||
}
|
}
|
||||||
if (!strcmp((const char *)node->name, "Version")){
|
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 = atof ((const char *)xmlNodeGetContent(node));
|
||||||
}
|
}
|
||||||
if (!strcmp((const char *)node->name, "MakeAndModel")){
|
if (!strcmp((const char *)node->name, "MakeAndModel")){
|
||||||
|
@ -587,6 +588,7 @@ escl_capabilities(ESCL_Device *device, char *blacklist, SANE_Status *status)
|
||||||
strstr(header->memory, "Server: HP_Compact_Server"))
|
strstr(header->memory, "Server: HP_Compact_Server"))
|
||||||
device->hack = curl_slist_append(NULL, "Host: localhost");
|
device->hack = curl_slist_append(NULL, "Host: localhost");
|
||||||
|
|
||||||
|
device->version = 0.0;
|
||||||
scanner->source = 0;
|
scanner->source = 0;
|
||||||
scanner->Sources = (SANE_String_Const *)malloc(sizeof(SANE_String_Const) * 4);
|
scanner->Sources = (SANE_String_Const *)malloc(sizeof(SANE_String_Const) * 4);
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
|
|
Ładowanie…
Reference in New Issue