|
|
|
@ -67,26 +67,24 @@ usbblaster_connect( char *params[], cable_t *cable )
|
|
|
|
|
params_t *cable_params;
|
|
|
|
|
int result;
|
|
|
|
|
|
|
|
|
|
/* perform generic_usbconn_connect */
|
|
|
|
|
if ( ( result = generic_usbconn_connect( params, cable ) ) != 0 )
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
cable_params = (params_t *)malloc( sizeof(params_t) );
|
|
|
|
|
if (!cable_params)
|
|
|
|
|
{
|
|
|
|
|
free( cable );
|
|
|
|
|
printf( _("%s(%d) malloc failed!\n"), __FILE__, __LINE__);
|
|
|
|
|
return 4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* perform generic_usbconn_connect */
|
|
|
|
|
result = generic_usbconn_connect( params, cable );
|
|
|
|
|
cx_cmd_init( &(cable_params->cmd_root) );
|
|
|
|
|
|
|
|
|
|
if (result == 0)
|
|
|
|
|
{
|
|
|
|
|
cx_cmd_init( &(cable_params->cmd_root) );
|
|
|
|
|
/* exchange generic cable parameters with our private parameter set */
|
|
|
|
|
free( cable->params );
|
|
|
|
|
cable->params = cable_params;
|
|
|
|
|
|
|
|
|
|
/* exchange generic cable parameters with our private parameter set */
|
|
|
|
|
free( cable->params );
|
|
|
|
|
cable->params = cable_params;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|