diff options
Diffstat (limited to 'sanei/sanei_usb.c')
-rw-r--r-- | sanei/sanei_usb.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/sanei/sanei_usb.c b/sanei/sanei_usb.c index 4b49b11..022f6fa 100644 --- a/sanei/sanei_usb.c +++ b/sanei/sanei_usb.c @@ -19,9 +19,7 @@ General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA. + along with this program. If not, see <https://www.gnu.org/licenses/>. As a special exception, the authors of SANE give permission for additional uses of the libraries contained in this release of SANE. @@ -506,7 +504,7 @@ SANE_Status sanei_usb_testing_enable_replay(SANE_String_Const path, testing_mode = sanei_usb_testing_mode_replay; testing_development_mode = development_mode; - // TODO: we'll leak if noone ever inits sane_usb properly + // TODO: we'll leak if no one ever inits sane_usb properly testing_xml_path = strdup(path); testing_xml_doc = xmlReadFile(testing_xml_path, NULL, 0); if (!testing_xml_doc) @@ -1124,6 +1122,19 @@ static void sanei_usb_replay_debug_msg(SANE_String_Const message) } } +extern void sanei_usb_testing_record_clear() +{ + if (testing_mode != sanei_usb_testing_mode_record) + return; + + // we only need to indicate that we never opened a device and sanei_usb_record_open() will + // reinitialize everything for us. + testing_already_opened = 0; + testing_known_commands_input_failed = 0; + testing_last_known_seq = 0; + testing_append_commands_node = NULL; +} + extern void sanei_usb_testing_record_message(SANE_String_Const message) { if (testing_mode == sanei_usb_testing_mode_record) @@ -1356,6 +1367,10 @@ SANE_Bool sanei_usb_is_replay_mode_enabled() return SANE_FALSE; } +void sanei_usb_testing_record_clear() +{ +} + void sanei_usb_testing_record_message(SANE_String_Const message) { (void) message; @@ -1443,7 +1458,7 @@ sanei_usb_init (void) /* sanei_usb is now initialized */ initialized++; - /* do a first scan of USB busses to fill device list */ + /* do a first scan of USB buses to fill device list */ sanei_usb_scan_devices(); } @@ -2221,7 +2236,7 @@ static const char* sanei_usb_transfer_type_desc(SANE_Int transfer_type) return NULL; } -// Similar sanei_usb_set_endpoint, but ignors duplicate endpoints +// Similar sanei_usb_set_endpoint, but ignores duplicate endpoints static void sanei_usb_add_endpoint(device_list_type* device, SANE_Int transfer_type, SANE_Int ep_address, |