for(i=0;i<cnt;i++)
{
int ret;
- // Check if this device is interesting.
+ /* Check if this device is interesting. */
struct libusb_device_descriptor desc;
libusb_device_handle *dh;
libusb_get_device_descriptor(devs[i],&desc);
if ((desc.idVendor != CANUSB_VID) || (desc.idProduct != CANUSB_PID))
- continue; //It is not, check next device
+ continue; /* It is not, check next device */
- //It is!
+ /* It is! */
dh = NULL;
if ((ret = libusb_open(devs[i],&dh)) == 0)
for(i=0;i<cnt;i++)
{
- // Check if this device is interesting.
+ /* Check if this device is interesting. */
struct libusb_device_descriptor desc;
libusb_device_handle *dh;
if ((desc.idVendor != CANUSB_VID) || (desc.idProduct != CANUSB_PID))
continue;
- //Found one!
+ /* Found one! */
dh = NULL;
if (libusb_open(devs[i],&dh) != 0) continue;
continue;
}
- //Fount it!
+ /* Fount it! */
libusb_free_device_list(devs,1);
return dh;
}
struct CAN_Msg msg;
libusb_interrupt_transfer(canusb->dev, 0x81, (unsigned char*)&status, sizeof(status), &sz, 100);
- //HACK!!!!! -> drop buffered data, read new one by reading twice.
+ /* HACK!!!!! -> drop buffered data, read new one by reading twice. */
libusb_interrupt_transfer(canusb->dev, 0x81, (unsigned char*)&status, sizeof(status), &sz, 100);
for(i = 0; i<status.rxsz; i++)
unsigned char cmd[16];
int al;
- cmd[0] = 1; //Empty incoming buffer
- cmd[1] = 1; //Empty outgoing buffer
- cmd[3] = 0; //Not a write to serial number
+ cmd[0] = 1; /* Empty incoming buffer */
+ cmd[1] = 1; /* Empty outgoing buffer */
+ cmd[3] = 0; /* Not a write to serial number */
memset(&cmd[4],0,16-4);
libusb_interrupt_transfer(this->dev, 0x1,cmd,16,&al,100);
message = dbus_connection_pop_message(handlep->conn);
while (!message) {
- // XXX handle->opt.timeout = timeout_ms;
+ /* XXX handle->opt.timeout = timeout_ms; */
if (!dbus_connection_read_write(handlep->conn, 100)) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Connection closed");
return -1;
* so let's use "Linux-cooked" mode. Jean II
*
* XXX - this is handled in activate_new(). */
- //handlep->cooked = 1;
+ /* handlep->cooked = 1; */
break;
/* ARPHRD_LAPD is unofficial and randomly allocated, if reallocation
*
* XXX - this is handled in activate_new().
*/
- //handlep->cooked = 1;
+ /* handlep->cooked = 1; */
break;
default:
*/
struct pcap_send_queue
{
- u_int maxlen; ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.
- u_int len; ///< Current size of the queue, in bytes.
- char *buffer; ///< Buffer containing the packets to be sent.
+ u_int maxlen; /* Maximum size of the the queue, in bytes. This
+ variable contains the size of the buffer field. */
+ u_int len; /* Current size of the queue, in bytes. */
+ char *buffer; /* Buffer containing the packets to be sent. */
};
typedef struct pcap_send_queue pcap_send_queue;