In particular: -- segfault with a high DEBUG level -- Fix IPA password migration (upstream #1873) -- Fix fail over when retrying SRV resolution (upstream #1886)
93 lines
3.5 KiB
Diff
93 lines
3.5 KiB
Diff
From 460e43ee4dcc7a5860bcdc3c76ae51ed79921d79 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
|
|
Date: Wed, 12 Jun 2013 09:50:54 +0200
|
|
Subject: [PATCH 03/12] be_ptask: send and recv shadow a global declaration
|
|
|
|
---
|
|
src/providers/dp_ptask.c | 18 +++++++++---------
|
|
src/providers/dp_ptask.h | 4 ++--
|
|
2 files changed, 11 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/src/providers/dp_ptask.c b/src/providers/dp_ptask.c
|
|
index d3580981b4abea8471c280a647eb558341d738ef..d0f7c6d9700dd9d5cf588c9f72954590f65f82b5 100644
|
|
--- a/src/providers/dp_ptask.c
|
|
+++ b/src/providers/dp_ptask.c
|
|
@@ -39,8 +39,8 @@ struct be_ptask {
|
|
time_t enabled_delay;
|
|
time_t timeout;
|
|
enum be_ptask_offline offline;
|
|
- be_ptask_send_t send;
|
|
- be_ptask_recv_t recv;
|
|
+ be_ptask_send_t send_fn;
|
|
+ be_ptask_recv_t recv_fn;
|
|
void *pvt;
|
|
const char *name;
|
|
|
|
@@ -139,7 +139,7 @@ static void be_ptask_execute(struct tevent_context *ev,
|
|
|
|
task->last_execution = time(NULL);
|
|
|
|
- task->req = task->send(task, task->ev, task->be_ctx, task, task->pvt);
|
|
+ task->req = task->send_fn(task, task->ev, task->be_ctx, task, task->pvt);
|
|
if (task->req == NULL) {
|
|
/* skip this iteration and try again later */
|
|
DEBUG(SSSDBG_OP_FAILURE, ("Task [%s]: failed to execute task, "
|
|
@@ -178,7 +178,7 @@ static void be_ptask_done(struct tevent_req *req)
|
|
|
|
task = tevent_req_callback_data(req, struct be_ptask);
|
|
|
|
- ret = task->recv(req);
|
|
+ ret = task->recv_fn(req);
|
|
talloc_zfree(req);
|
|
task->req = NULL;
|
|
switch (ret) {
|
|
@@ -246,8 +246,8 @@ errno_t be_ptask_create(TALLOC_CTX *mem_ctx,
|
|
time_t enabled_delay,
|
|
time_t timeout,
|
|
enum be_ptask_offline offline,
|
|
- be_ptask_send_t send,
|
|
- be_ptask_recv_t recv,
|
|
+ be_ptask_send_t send_fn,
|
|
+ be_ptask_recv_t recv_fn,
|
|
void *pvt,
|
|
const char *name,
|
|
struct be_ptask **_task)
|
|
@@ -255,7 +255,7 @@ errno_t be_ptask_create(TALLOC_CTX *mem_ctx,
|
|
struct be_ptask *task = NULL;
|
|
errno_t ret;
|
|
|
|
- if (be_ctx == NULL || period == 0 || send == NULL || recv == NULL
|
|
+ if (be_ctx == NULL || period == 0 || send_fn == NULL || recv_fn == NULL
|
|
|| name == NULL) {
|
|
return EINVAL;
|
|
}
|
|
@@ -272,8 +272,8 @@ errno_t be_ptask_create(TALLOC_CTX *mem_ctx,
|
|
task->enabled_delay = enabled_delay;
|
|
task->timeout = timeout;
|
|
task->offline = offline;
|
|
- task->send = send;
|
|
- task->recv = recv;
|
|
+ task->send_fn = send_fn;
|
|
+ task->recv_fn = recv_fn;
|
|
task->pvt = pvt;
|
|
task->name = talloc_strdup(task, name);
|
|
if (task->name == NULL) {
|
|
diff --git a/src/providers/dp_ptask.h b/src/providers/dp_ptask.h
|
|
index ae5f78d586df69bdcfa34bb35f032ad1dbd1b983..7e45862e46c5d9da4eaedca5312e25dcc0eb8abe 100644
|
|
--- a/src/providers/dp_ptask.h
|
|
+++ b/src/providers/dp_ptask.h
|
|
@@ -81,8 +81,8 @@ errno_t be_ptask_create(TALLOC_CTX *mem_ctx,
|
|
time_t enabled_delay,
|
|
time_t timeout,
|
|
enum be_ptask_offline offline,
|
|
- be_ptask_send_t send,
|
|
- be_ptask_recv_t recv,
|
|
+ be_ptask_send_t send_fn,
|
|
+ be_ptask_recv_t recv_fn,
|
|
void *pvt,
|
|
const char *name,
|
|
struct be_ptask **_task);
|
|
--
|
|
1.8.2.1
|
|
|