summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-06-03 22:08:31 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-06-29 11:37:18 -0400
commitcfd539e2ebbe035cbc69aa3000c6b61a9fd36645 (patch)
tree36ee66cc3643e420c3df65ffc7d505e91e6621e5 /src/providers
parent16484408ce03aaddfe2a146621b14a43bdeb6808 (diff)
downloadsssd-cfd539e2ebbe035cbc69aa3000c6b61a9fd36645.tar.gz
sssd-cfd539e2ebbe035cbc69aa3000c6b61a9fd36645.tar.bz2
sssd-cfd539e2ebbe035cbc69aa3000c6b61a9fd36645.zip
sdap_sudo.c: move _recv after _done
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/sdap_sudo.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c
index eb79dcb7..002f138e 100644
--- a/src/providers/ldap/sdap_sudo.c
+++ b/src/providers/ldap/sdap_sudo.c
@@ -60,12 +60,12 @@ static struct tevent_req *sdap_sudo_rules_refresh_send(TALLOC_CTX *mem_ctx,
struct sdap_id_conn_cache *conn_cache,
char **rules);
+static void sdap_sudo_rules_refresh_done(struct tevent_req *subreq);
+
static int sdap_sudo_rules_refresh_recv(struct tevent_req *req,
int *dp_error,
int *error);
-static void sdap_sudo_rules_refresh_done(struct tevent_req *subreq);
-
struct sdap_sudo_smart_refresh_state {
struct tevent_req *subreq;
struct sdap_id_ctx *id_ctx;
@@ -385,21 +385,6 @@ immediately:
return req;
}
-static int sdap_sudo_full_refresh_recv(struct tevent_req *req,
- int *dp_error,
- int *error)
-{
- struct sdap_sudo_full_refresh_state *state = NULL;
- state = tevent_req_data(req, struct sdap_sudo_full_refresh_state);
-
- TEVENT_REQ_RETURN_ON_ERROR(req);
-
- *dp_error = state->dp_error;
- *error = state->error;
-
- return EOK;
-}
-
static void sdap_sudo_full_refresh_done(struct tevent_req *subreq)
{
struct tevent_req *req = NULL;
@@ -438,6 +423,21 @@ static void sdap_sudo_full_refresh_done(struct tevent_req *subreq)
tevent_req_done(req);
}
+static int sdap_sudo_full_refresh_recv(struct tevent_req *req,
+ int *dp_error,
+ int *error)
+{
+ struct sdap_sudo_full_refresh_state *state = NULL;
+ state = tevent_req_data(req, struct sdap_sudo_full_refresh_state);
+
+ TEVENT_REQ_RETURN_ON_ERROR(req);
+
+ *dp_error = state->dp_error;
+ *error = state->error;
+
+ return EOK;
+}
+
/* issue refresh of specific sudo rules */
static struct tevent_req *sdap_sudo_rules_refresh_send(TALLOC_CTX *mem_ctx,
struct sdap_id_ctx *id_ctx,
@@ -540,21 +540,6 @@ immediately:
return req;
}
-static int sdap_sudo_rules_refresh_recv(struct tevent_req *req,
- int *dp_error,
- int *error)
-{
- struct sdap_sudo_rules_refresh_state *state = NULL;
- state = tevent_req_data(req, struct sdap_sudo_rules_refresh_state);
-
- TEVENT_REQ_RETURN_ON_ERROR(req);
-
- *dp_error = state->dp_error;
- *error = state->error;
-
- return EOK;
-}
-
static void sdap_sudo_rules_refresh_done(struct tevent_req *subreq)
{
struct tevent_req *req = NULL;
@@ -586,6 +571,21 @@ static void sdap_sudo_rules_refresh_done(struct tevent_req *subreq)
tevent_req_done(req);
}
+static int sdap_sudo_rules_refresh_recv(struct tevent_req *req,
+ int *dp_error,
+ int *error)
+{
+ struct sdap_sudo_rules_refresh_state *state = NULL;
+ state = tevent_req_data(req, struct sdap_sudo_rules_refresh_state);
+
+ TEVENT_REQ_RETURN_ON_ERROR(req);
+
+ *dp_error = state->dp_error;
+ *error = state->error;
+
+ return EOK;
+}
+
/* issue smart refresh of sudo rules */
static struct tevent_req *sdap_sudo_smart_refresh_send(TALLOC_CTX *mem_ctx,
struct sdap_id_ctx *id_ctx)
@@ -659,19 +659,6 @@ immediately:
return req;
}
-static int sdap_sudo_smart_refresh_recv(struct tevent_req *req,
- int *dp_error,
- int *error)
-{
- struct sdap_sudo_smart_refresh_state *state = NULL;
- state = tevent_req_data(req, struct sdap_sudo_smart_refresh_state);
-
- TEVENT_REQ_RETURN_ON_ERROR(req);
-
- return sdap_sudo_refresh_recv(state, state->subreq, dp_error, error,
- NULL, NULL);
-}
-
static void sdap_sudo_smart_refresh_done(struct tevent_req *subreq)
{
struct tevent_req *req = NULL;
@@ -701,6 +688,19 @@ static void sdap_sudo_smart_refresh_done(struct tevent_req *subreq)
tevent_req_done(req);
}
+static int sdap_sudo_smart_refresh_recv(struct tevent_req *req,
+ int *dp_error,
+ int *error)
+{
+ struct sdap_sudo_smart_refresh_state *state = NULL;
+ state = tevent_req_data(req, struct sdap_sudo_smart_refresh_state);
+
+ TEVENT_REQ_RETURN_ON_ERROR(req);
+
+ return sdap_sudo_refresh_recv(state, state->subreq, dp_error, error,
+ NULL, NULL);
+}
+
static void sdap_sudo_periodical_first_refresh_done(struct tevent_req *req)
{
struct tevent_req *subreq = NULL; /* req from sdap_sudo_full_refresh_send() */