Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13078245 authored by Josh Gao's avatar Josh Gao
Browse files

tombstoned: don't increment num_concurrent_dumps until success.

Previously, we would increment num_concurrent_dumps and fail to
decrement it if we failed to start the request. Change this to
only increment after we've successfully started the dump.

Bug: http://b/36685795
Test: debuggerd_test
Change-Id: I66169ed56ed44271e1d8fe1298d95260be7a32a3
parent 6fb2ef1d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -127,8 +127,6 @@ static unique_fd get_tombstone_fd() {
}

static void dequeue_request(Crash* crash) {
  ++num_concurrent_dumps;

  unique_fd output_fd;
  if (!intercept_manager->GetIntercept(crash->crash_pid, &output_fd)) {
    output_fd = get_tombstone_fd();
@@ -153,6 +151,8 @@ static void dequeue_request(Crash* crash) {
                 crash_completed_cb, crash);
    event_add(crash->crash_event, &timeout);
  }

  ++num_concurrent_dumps;
  return;

fail: