backend/v4l.c: duplicate capability.name in attach() so that each device is listed with its actual name, not with the name of the last discovered device. Reported by Andreas Hartmann.

merge-requests/1/head
Julien BLACHE 2005-04-28 21:18:41 +00:00
rodzic 23b39a25f1
commit 390e9b4884
2 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -1,3 +1,8 @@
2005-04-28 Julien Blache <jb@jblache.org>
* backend/v4l.c: duplicate capability.name in attach() so that
each device is listed with its actual name, not with the name of
the last discovered device. Reported by Andreas Hartmann.
2005-04-28 Mattias Ellert <mattias.ellert@tsl.uu.se>
* frontend/scanimage.c: Added missing braces

Wyświetl plik

@ -178,7 +178,9 @@ attach (const char *devname, V4L_Device ** devp)
if (!dev->sane.name)
return SANE_STATUS_NO_MEM;
dev->sane.vendor = "Noname";
dev->sane.model = capability.name;
dev->sane.model = strdup (capability.name);
if (!dev->sane.model)
return SANE_STATUS_NO_MEM;
dev->sane.type = "virtual device";
++num_devices;
@ -466,6 +468,7 @@ sane_exit (void)
{
next = dev->next;
free ((void *) dev->sane.name);
free ((void *) dev->sane.model);
free (dev);
}