diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-08 17:19:05 -0500 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-08 17:29:27 -0500 |
commit | fe38d0d4925be0e0182ec5b511b8f7fe715ffee5 (patch) | |
tree | ec793794470a14b44380ce922040446cf53de663 /src | |
parent | 2b6a91c5885328894fddbad3acd33d80cf5fb792 (diff) |
Reject a response that should have had PID but did not.
Diffstat (limited to 'src')
-rw-r--r-- | src/obd2/obd2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/obd2/obd2.c b/src/obd2/obd2.c index 1c3d7bc3..c000aa3e 100644 --- a/src/obd2/obd2.c +++ b/src/obd2/obd2.c @@ -161,7 +161,8 @@ static bool handle_positive_response(DiagnosticRequestHandle* handle, response->payload_length); } - if(!has_pid || response->pid == handle->request.pid) { + if((handle->request.pid_length == 0 && !has_pid) + || response->pid == handle->request.pid) { response->success = true; response->completed = true; } else { |