backend version 1.0.10- fix missing function

merge-requests/1/head
m. allan noah 2007-12-19 22:14:19 +00:00
rodzic 785f67981b
commit d3cc1b13a8
4 zmienionych plików z 35 dodań i 12 usunięć

Wyświetl plik

@ -1,3 +1,6 @@
2007-12-19 m. allan noah <kitno455 a t gmail d o t com>
* backend/epjitsu.c: backend v1.0.10, fix missing function
2007-12-19 Jonathan Bravo Lopez <jkdsoft@gmail.com> 2007-12-19 Jonathan Bravo Lopez <jkdsoft@gmail.com>
* po/sane-backends.es.po: Updated translation. * po/sane-backends.es.po: Updated translation.

Wyświetl plik

@ -90,6 +90,8 @@
- fi-60F 300 & 600 dpi support (150 is non-square?) - fi-60F 300 & 600 dpi support (150 is non-square?)
- fi-60F gray & binary support - fi-60F gray & binary support
- fi-60F improved calibration - fi-60F improved calibration
V 1.0.10, 2007-12-19, MAN
- fix missing function (and memory leak)
SANE FLOW DIAGRAM SANE FLOW DIAGRAM
@ -149,7 +151,7 @@
#include "epjitsu-cmd.h" #include "epjitsu-cmd.h"
#define DEBUG 1 #define DEBUG 1
#define BUILD 9 #define BUILD 10
unsigned char global_firmware_filename[PATH_MAX]; unsigned char global_firmware_filename[PATH_MAX];
@ -318,7 +320,7 @@ attach_one (const char *name)
/* copy the device name */ /* copy the device name */
s->sane.name = strdup (name); s->sane.name = strdup (name);
if (!s->sane.name){ if (!s->sane.name){
free_scanner (s); sane_close((SANE_Handle)s);
return SANE_STATUS_NO_MEM; return SANE_STATUS_NO_MEM;
} }
@ -328,14 +330,14 @@ attach_one (const char *name)
s->fd = -1; s->fd = -1;
ret = connect_fd(s); ret = connect_fd(s);
if(ret != SANE_STATUS_GOOD){ if(ret != SANE_STATUS_GOOD){
free_scanner (s); sane_close((SANE_Handle)s);
return ret; return ret;
} }
/* load the firmware file into scanner */ /* load the firmware file into scanner */
ret = load_fw(s); ret = load_fw(s);
if (ret != SANE_STATUS_GOOD) { if (ret != SANE_STATUS_GOOD) {
free_scanner (s); sane_close((SANE_Handle)s);
DBG (5, "attach_one: firmware load failed\n"); DBG (5, "attach_one: firmware load failed\n");
return ret; return ret;
} }
@ -343,7 +345,7 @@ attach_one (const char *name)
/* Now query the device to load its vendor/model/version */ /* Now query the device to load its vendor/model/version */
ret = get_ident(s); ret = get_ident(s);
if (ret != SANE_STATUS_GOOD) { if (ret != SANE_STATUS_GOOD) {
free_scanner (s); sane_close((SANE_Handle)s);
DBG (5, "attach_one: identify failed\n"); DBG (5, "attach_one: identify failed\n");
return ret; return ret;
} }
@ -2976,12 +2978,29 @@ sane_cancel (SANE_Handle handle)
void void
sane_close (SANE_Handle handle) sane_close (SANE_Handle handle)
{ {
struct scanner * s = (struct scanner *) handle;
DBG (10, "sane_close: start\n"); DBG (10, "sane_close: start\n");
sane_cancel(handle); /* still connected- drop it */
lamp((struct scanner *) handle, 0); if(s->fd >= 0){
disconnect_fd((struct scanner *) handle); sane_cancel(handle);
teardown_buffers((struct scanner *) handle); lamp(s, 0);
disconnect_fd(s);
}
if(s->sane.name){
free(s->sane.name);
}
if(s->sane.model){
free(s->sane.model);
}
if(s->sane.vendor){
free(s->sane.vendor);
}
teardown_buffers(s);
free(s);
DBG (10, "sane_close: finish\n"); DBG (10, "sane_close: finish\n");
} }
@ -3182,6 +3201,9 @@ do_cmd(struct scanner *s, int shortTime,
if(ret == SANE_STATUS_EOF){ if(ret == SANE_STATUS_EOF){
DBG(5,"in: got EOF, continuing\n"); DBG(5,"in: got EOF, continuing\n");
} }
else if(ret == SANE_STATUS_IO_ERROR){
DBG(5,"in: got IO_ERROR, continuing\n");
}
else if(ret != SANE_STATUS_GOOD){ else if(ret != SANE_STATUS_GOOD){
DBG(5,"in: return error '%s'\n",sane_strstatus(ret)); DBG(5,"in: return error '%s'\n",sane_strstatus(ret));
return ret; return ret;

Wyświetl plik

@ -277,8 +277,6 @@ static SANE_Status read_from_scanner(struct scanner *s, struct transfer *tp);
static SANE_Status fill_frontback_buffers_S300(struct scanner *s); static SANE_Status fill_frontback_buffers_S300(struct scanner *s);
static SANE_Status fill_frontback_buffers_FI60F(struct scanner *s); static SANE_Status fill_frontback_buffers_FI60F(struct scanner *s);
void free_scanner(struct scanner *s);
/* utils */ /* utils */
static void hexdump (int level, char *comment, unsigned char *p, int l); static void hexdump (int level, char *comment, unsigned char *p, int l);
static size_t maxStringSize (const SANE_String_Const strings[]); static size_t maxStringSize (const SANE_String_Const strings[]);

Wyświetl plik

@ -11,7 +11,7 @@
:backend "epjitsu" ; name of backend :backend "epjitsu" ; name of backend
:url "http://www.thebility.com/epjitsu/" :url "http://www.thebility.com/epjitsu/"
:version "1.0.9" ; version of backend :version "1.0.10" ; version of backend
:manpage "sane-epjitsu" ; name of manpage (if it exists) :manpage "sane-epjitsu" ; name of manpage (if it exists)
:comment "Only basic support provided, see sane-epjitsu manpage" :comment "Only basic support provided, see sane-epjitsu manpage"
:devicetype :scanner ; start of a list of devices.... :devicetype :scanner ; start of a list of devices....