diff options
-rw-r--r-- | src/providers/ldap/ldap_common.h | 2 | ||||
-rw-r--r-- | src/providers/ldap/sdap_id_op.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/providers/ldap/ldap_common.h b/src/providers/ldap/ldap_common.h index f552520a0..2e060f0ba 100644 --- a/src/providers/ldap/ldap_common.h +++ b/src/providers/ldap/ldap_common.h @@ -57,6 +57,8 @@ struct sdap_id_conn_ctx { struct sdap_id_conn_ctx *prev, *next; /* do not go offline, try another connection */ bool ignore_mark_offline; + /* time of last successfull connection */ + time_t conn_time; }; struct sdap_id_ctx { diff --git a/src/providers/ldap/sdap_id_op.c b/src/providers/ldap/sdap_id_op.c index 0474a9cb7..6d8cdc384 100644 --- a/src/providers/ldap/sdap_id_op.c +++ b/src/providers/ldap/sdap_id_op.c @@ -773,6 +773,7 @@ static void sdap_id_op_connect_req_complete(struct sdap_id_op *op, int dp_error, state->result = ret; if (ret == EOK) { + op->conn_data->conn_cache->id_conn->conn_time = time(NULL); tevent_req_done(req); } else { sdap_id_op_hook_conn_data(op, NULL); |