diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index a8a84e02..3542d81f 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -3,6 +3,10 @@ * configure.ac (fmax): Drop fmax check as it is no longer used. * src/tap/cable/generic.c (fmax): Drop now unused fmax fallback. + * src/cmd/cmd_cable.c (cmd_cable_run): Fill out the cable->chain link. + * src/tap/cable/generic.c (urj_tap_cable_generic_disconnect): Clear the + cable->chain link once we're done with it. + 2010-06-22 Mike Frysinger * src/tap/usbconn/libftdi.c (usbconn_ftdi_flush): Fix gcc printf warning. diff --git a/urjtag/src/cmd/cmd_cable.c b/urjtag/src/cmd/cmd_cable.c index 874ac7f1..49366fd7 100644 --- a/urjtag/src/cmd/cmd_cable.c +++ b/urjtag/src/cmd/cmd_cable.c @@ -169,7 +169,11 @@ cmd_cable_run (urj_chain_t *chain, char *params[]) urj_param_clear (&cable_params); - return cable == NULL ? URJ_STATUS_FAIL : URJ_STATUS_OK; + if (cable == NULL) + return URJ_STATUS_FAIL; + + chain->cable->chain = chain; + return URJ_STATUS_OK; } static void diff --git a/urjtag/src/tap/cable/generic.c b/urjtag/src/tap/cable/generic.c index c5b007d1..47682c89 100644 --- a/urjtag/src/tap/cable/generic.c +++ b/urjtag/src/tap/cable/generic.c @@ -53,6 +53,7 @@ urj_tap_cable_generic_disconnect (urj_cable_t *cable) { urj_tap_cable_done (cable); urj_tap_chain_disconnect (cable->chain); + cable->chain = NULL; } int