Added partial match in USB product name

In case the usb device name is not found among the available devices, a
partial string comparison is performed.

Author: Stefano Speretta, Innovative Solutions In Space BV
<s.speretta@isispace.nl>
Signed-off-by: Stefano Speretta <s.speretta@isispace.nl>

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3054 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.13
Nate Bargmann, N0NB 2011-02-17 12:22:48 +00:00
rodzic 931ae29e3c
commit d78648a170
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -145,8 +145,10 @@ static struct usb_dev_handle *find_and_open_device(const hamlib_port_t *port)
}
rig_debug(RIG_DEBUG_TRACE, " product >%s<", string);
if (strcmp(string, port->parm.usb.product) != 0){
usb_close(udh);
continue;
if (strstr(string, port->parm.usb.product) != 0){
usb_close(udh);
continue;
}
}
}