Lines Matching refs:rRState
312 struct ChppRequestResponseState *rRState, in chppClientTimestampRequest() argument
315 if (rRState->requestState == CHPP_REQUEST_STATE_REQUEST_SENT) { in chppClientTimestampRequest()
317 requestHeader->transaction, rRState->transaction, in chppClientTimestampRequest()
318 rRState->requestTimeNs / CHPP_NSEC_PER_MSEC); in chppClientTimestampRequest()
321 rRState->responseTimeNs = CHPP_TIME_MAX; in chppClientTimestampRequest()
325 rRState->requestTimeNs = chppGetCurrentTimeNs(); in chppClientTimestampRequest()
326 rRState->requestState = CHPP_REQUEST_STATE_REQUEST_SENT; in chppClientTimestampRequest()
327 rRState->transaction = requestHeader->transaction; in chppClientTimestampRequest()
330 rRState->responseTimeNs = CHPP_TIME_MAX; in chppClientTimestampRequest()
333 rRState->responseTimeNs = timeoutNs + rRState->requestTimeNs; in chppClientTimestampRequest()
336 clientState->appContext->nextRequestTimeoutNs, rRState->responseTimeNs); in chppClientTimestampRequest()
341 rRState->transaction, rRState->requestTimeNs / CHPP_NSEC_PER_MSEC, in chppClientTimestampRequest()
342 rRState->responseTimeNs / CHPP_NSEC_PER_MSEC, in chppClientTimestampRequest()
348 struct ChppRequestResponseState *rRState, in chppClientTimestampResponse() argument
353 switch (rRState->requestState) { in chppClientTimestampResponse()
363 rRState->requestTimeNs / CHPP_NSEC_PER_MSEC); in chppClientTimestampResponse()
370 rRState->requestTimeNs / CHPP_NSEC_PER_MSEC); in chppClientTimestampResponse()
375 if (responseHeader->transaction != rRState->transaction) { in chppClientTimestampResponse()
379 responseTime / CHPP_NSEC_PER_MSEC, rRState->transaction); in chppClientTimestampResponse()
381 rRState->requestState = (responseTime > rRState->responseTimeNs) in chppClientTimestampResponse()
389 rRState->transaction, rRState->requestTimeNs / CHPP_NSEC_PER_MSEC, in chppClientTimestampResponse()
391 rRState->responseTimeNs / CHPP_NSEC_PER_MSEC, in chppClientTimestampResponse()
392 (responseTime - rRState->requestTimeNs) / CHPP_NSEC_PER_MSEC, in chppClientTimestampResponse()
393 (responseTime > rRState->responseTimeNs) ? "yes" : "no"); in chppClientTimestampResponse()
404 if (rRState->responseTimeNs == in chppClientTimestampResponse()
409 rRState->responseTimeNs = responseTime; in chppClientTimestampResponse()
415 struct ChppRequestResponseState *rRState, in chppSendTimestampedRequestOrFail() argument
424 chppClientTimestampRequest(clientState, rRState, buf, timeoutNs); in chppSendTimestampedRequestOrFail()
434 rRState->requestState = CHPP_REQUEST_STATE_NONE; in chppSendTimestampedRequestOrFail()
441 struct ChppRequestResponseState *rRState, in chppSendTimestampedRequestAndWait() argument
444 clientState, rRState, buf, len, CHPP_CLIENT_REQUEST_TIMEOUT_DEFAULT); in chppSendTimestampedRequestAndWait()
449 struct ChppRequestResponseState *rRState, void *buf, size_t len, in chppSendTimestampedRequestAndWaitTimeout() argument
452 clientState, rRState, buf, len, CHPP_CLIENT_REQUEST_TIMEOUT_INFINITE); in chppSendTimestampedRequestAndWaitTimeout()
463 rRState->requestState = CHPP_REQUEST_STATE_RESPONSE_TIMEOUT; in chppSendTimestampedRequestAndWaitTimeout()
547 struct ChppRequestResponseState *rRState = in chppClientRecalculateNextTimeout() local
550 if (rRState->requestState == CHPP_REQUEST_STATE_REQUEST_SENT) { in chppClientRecalculateNextTimeout()
552 MIN(context->nextRequestTimeoutNs, rRState->responseTimeNs); in chppClientRecalculateNextTimeout()