Skip to content

Commit

Permalink
tools/firewire: nosy-dump: work around segfault in decode_fcp
Browse files Browse the repository at this point in the history
If I run "nosy-dump --view=transaction" with my camcorder on battery
instead of mains, it segfaults very quickly because of !t->request.
Perhaps this is because of increased likelyhood of incomplete
transactions (ack_busy when host writes to camcorder's FCP_Request)
and a bug deeper in nosy-dump's transaction housekeeping.  This is a
quick workaround to get me going.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
  • Loading branch information
Stefan Richter committed Jul 27, 2010
1 parent 1bcc69f commit a8461c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/firewire/nosy-dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ handle_transaction(struct link_transaction *t)
struct subaction *sa;
int i;

if (!t->request) {
printf("BUG in handle_transaction\n");
return;
}

for (i = 0; i < array_length(protocol_decoders); i++)
if (protocol_decoders[i].decode(t))
break;
Expand Down

0 comments on commit a8461c0

Please sign in to comment.