On Thursday, August 19, 2010 03:20:33 simon qian wrote: > > this one looks fine to me ... there's a few more style tweaks needed, > > but i can take care of them. so if you're happy at this point, i'll > > commit it. > > Thank you. You can commit it.
ive cleaned it up a bit and merged it. please make sure i didnt screw
anything up in the process.
> I'll mail to the Versaloon users list to test it and feedback if any
> problem.
i did notice a few things in your latest patch in the init function ...
first, you do a malloc() for your data struct, but you dont initialize any of
the pointers. before you've set tdi/tms buffer to a malloc, you call
vslink_free(), and their values could be uninitialized garbage.
also, the in_length handling here is a bit odd:
/* connect to versaloon */
for (retry = 0; retry < 3; retry++)
{
data->usb_buffer[0] = VERSALOON_GET_INFO;
in_length = 0;
result = vsllink_usb_message (params, 1, in_length, 100);
if (result >= 3)
break;
}
...
data->usb_buffer[in_length] = '\0';
data->usb_buffer_size = data->usb_buffer[0] + (data->usb_buffer[1] << 8);
the value of in_length is going to stay at 0 the whole time, so at the end you
write '\0' to usb_buffer[0] and then use it in the math in the next line.
-mike
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________ UrJTAG-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/urjtag-development
