scanalogic2: Only print actual state changes in the log.

This commit is contained in:
Uwe Hermann 2013-06-11 18:55:47 +02:00
parent 9526f2d4f8
commit 28083961fb
1 changed files with 6 additions and 2 deletions

View File

@ -292,7 +292,9 @@ SR_PRIV void sl2_receive_transfer_in( struct libusb_transfer *transfer)
return;
}
sr_spew("State changed from %i to %i.", devc->state, devc->next_state);
if (devc->state != devc->next_state)
sr_spew("State changed from %i to %i.",
devc->state, devc->next_state);
devc->state = devc->next_state;
if (devc->state == STATE_WAIT_DATA_READY) {
@ -421,7 +423,9 @@ SR_PRIV void sl2_receive_transfer_out( struct libusb_transfer *transfer)
return;
}
sr_spew("State changed from %i to %i.", devc->state, devc->next_state);
if (devc->state != devc->next_state)
sr_spew("State changed from %i to %i.",
devc->state, devc->next_state);
devc->state = devc->next_state;
if (devc->state == STATE_IDLE) {