From 73f959f122cfd53c3649741653393da5168530bf Mon Sep 17 00:00:00 2001 From: ionutrazvanionita Date: Fri, 12 Feb 2016 12:37:21 +0200 Subject: [PATCH] [bugfix]on resume fetch index from async context --- lib/buildreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/buildreq.c b/lib/buildreq.c index 122a34bf..45e70d7e 100644 --- a/lib/buildreq.c +++ b/lib/buildreq.c @@ -385,7 +385,7 @@ int rc_aaa_async (rc_handle *rh, uint32_t client_port, VALUE_PAIR *send, VALUE_P /*rc_receive async name*/ int rc_aaa_receive_async(SEND_CONTEXT **ctx, VALUE_PAIR **received, int request_type) { - int i, j; + int i; int result; if (*ctx == NULL) { @@ -396,6 +396,7 @@ int rc_aaa_receive_async(SEND_CONTEXT **ctx, VALUE_PAIR **received, int request_ result = rc_receive_async(ctx); if (result != READBLOCK_RC) { + i = (*ctx)->idx; (*ctx)->aaaserver->deadtime_ends[i] = -1; if (request_type != PW_ACCOUNTING_REQUEST) { *received = (*ctx)->data->receive_pairs;