agent: Check if callback has sent a new request

In agent_receive_reply we first call the callback for the pending
request (agent_finalize_pending) then try to send the next request
in the queue.  Check that the next request has not been sent already
which could happen if it has been just queued by the callback.
This commit is contained in:
Andrew Zaborowski 2018-04-18 07:03:31 +02:00 committed by Denis Kenzior
parent c6e3140b38
commit b862fd8fe1
1 changed files with 2 additions and 1 deletions

View File

@ -227,7 +227,8 @@ static void agent_receive_reply(struct l_dbus_message *message,
agent_finalize_pending(agent, message);
agent_send_next_request(agent);
if (!agent->pending_id)
agent_send_next_request(agent);
}
static void agent_send_next_request(struct agent *agent)