Skip to content

Commit

Permalink
use timeout error instead of "syn received" when notifying current re…
Browse files Browse the repository at this point in the history
…quest
  • Loading branch information
john30 committed Mar 28, 2015
1 parent 0b9fc2b commit 5b22911
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ebusd/bushandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ result_t BusHandler::sendAndWait(SymbolString& master, SymbolString& slave)
logError(lf_bus, "%s, give up", getResultCode(result));
break;
}
logError(lf_bus, "%s, %s", getResultCode(result), sendRetries>0 ? "retry send" : "");
logError(lf_bus, "%s%s", getResultCode(result), sendRetries>0 ? ", retry" : "");

request.m_busLostRetries = 0;
}
Expand Down Expand Up @@ -634,7 +634,9 @@ result_t BusHandler::setState(BusState state, result_t result, bool firstRepetit
}
m_seenAddresses[dstAddress] = true;
}
bool restart = m_currentRequest->notify(result, m_response);
bool restart = m_currentRequest->notify(
result == RESULT_ERR_SYN && (m_state == bs_recvCmdAck || m_state == bs_recvRes) ? RESULT_ERR_TIMEOUT : result, m_response
);
if (restart) {
m_currentRequest->m_busLostRetries = 0;
m_nextRequests.add(m_currentRequest);
Expand Down

0 comments on commit 5b22911

Please sign in to comment.