sssd  2.2.3
About: SSSD provides a set of daemons to manage access to remote directories and authentication mechanisms such as LDAP, Kerberos or FreeIPA. It provides also an NSS and PAM interface toward the system.
  Fossies Dox: sssd-2.2.3.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

be_ptask.c
Go to the documentation of this file.
1 /*
2  Authors:
3  Pavel Březina <pbrezina@redhat.com>
4 
5  Copyright (C) 2013 Red Hat
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #include <tevent.h>
22 #include <talloc.h>
23 #include <time.h>
24 #include <string.h>
25 
26 #include "util/util.h"
27 #include "util/crypto/sss_crypto.h"
28 #include "providers/backend.h"
30 #include "providers/be_ptask.h"
31 
32 #define backoff_allowed(ptask) (ptask->max_backoff != 0)
33 
38 };
39 
40 static void be_ptask_schedule(struct be_ptask *task,
41  enum be_ptask_delay delay_type,
42  uint32_t from);
43 
44 static int be_ptask_destructor(void *pvt)
45 {
46  struct be_ptask *task;
47 
48  task = talloc_get_type(pvt, struct be_ptask);
49  if (task == NULL) {
50  DEBUG(SSSDBG_FATAL_FAILURE, "BUG: task is NULL\n");
51  return 0;
52  }
53 
54  DEBUG(SSSDBG_TRACE_FUNC, "Terminating periodic task [%s]\n", task->name);
55 
56  return 0;
57 }
58 
59 static void be_ptask_online_cb(void *pvt)
60 {
61  struct be_ptask *task = NULL;
62 
63  task = talloc_get_type(pvt, struct be_ptask);
64  if (task == NULL) {
65  DEBUG(SSSDBG_FATAL_FAILURE, "BUG: task is NULL\n");
66  return;
67  }
68 
69  DEBUG(SSSDBG_TRACE_FUNC, "Back end is online\n");
70  be_ptask_enable(task);
71 }
72 
73 static void be_ptask_offline_cb(void *pvt)
74 {
75  struct be_ptask *task = NULL;
76  task = talloc_get_type(pvt, struct be_ptask);
77 
78  DEBUG(SSSDBG_TRACE_FUNC, "Back end is offline\n");
79  be_ptask_disable(task);
80 }
81 
82 static void be_ptask_timeout(struct tevent_context *ev,
83  struct tevent_timer *tt,
84  struct timeval tv,
85  void *pvt)
86 {
87  struct be_ptask *task = NULL;
88  task = talloc_get_type(pvt, struct be_ptask);
89 
90  DEBUG(SSSDBG_OP_FAILURE, "Task [%s]: timed out\n", task->name);
91 
92  talloc_zfree(task->req);
94 }
95 
96 static void be_ptask_done(struct tevent_req *req);
97 
98 static void be_ptask_execute(struct tevent_context *ev,
99  struct tevent_timer *tt,
100  struct timeval tv,
101  void *pvt)
102 {
103  struct be_ptask *task = NULL;
104  struct tevent_timer *timeout = NULL;
105 
106  task = talloc_get_type(pvt, struct be_ptask);
107  task->timer = NULL; /* timer is freed by tevent */
108 
109  if (be_is_offline(task->be_ctx)) {
110  DEBUG(SSSDBG_TRACE_FUNC, "Back end is offline\n");
111  if (task->flags & BE_PTASK_OFFLINE_SKIP) {
114  return;
115  }
116  else if(task->flags & BE_PTASK_OFFLINE_DISABLE) {
117  /* This case is normally handled by offline callback but we
118  * should handle it here as well since we can get here in some
119  * special cases for example unit tests or tevent events order. */
120  be_ptask_disable(task);
121  return;
122  }
123  /* BE_PTASK_OFFLINE_EXECUTE */
124  /* continue */
125  }
126 
127  DEBUG(SSSDBG_TRACE_FUNC, "Task [%s]: executing task, timeout %lu "
128  "seconds\n", task->name, task->timeout);
129 
130  task->last_execution = tv.tv_sec;
131 
132  task->req = task->send_fn(task, task->ev, task->be_ctx, task, task->pvt);
133  if (task->req == NULL) {
134  /* skip this iteration and try again later */
135  DEBUG(SSSDBG_OP_FAILURE, "Task [%s]: failed to execute task, "
136  "will try again later\n", task->name);
137 
139  return;
140  }
141 
142  tevent_req_set_callback(task->req, be_ptask_done, task);
143 
144  /* schedule timeout */
145  if (task->timeout > 0) {
146  tv = tevent_timeval_current_ofs(task->timeout, 0);
147  timeout = tevent_add_timer(task->ev, task->req, tv,
148  be_ptask_timeout, task);
149  if (timeout == NULL) {
150  /* If we can't guarantee a timeout,
151  * we need to cancel the request. */
152  talloc_zfree(task->req);
153 
154  DEBUG(SSSDBG_OP_FAILURE, "Task [%s]: failed to set timeout, "
155  "the task will be rescheduled\n", task->name);
156 
159  }
160  }
161 
162  return;
163 }
164 
165 static void be_ptask_done(struct tevent_req *req)
166 {
167  struct be_ptask *task = NULL;
168  errno_t ret;
169 
170  task = tevent_req_callback_data(req, struct be_ptask);
171 
172  ret = task->recv_fn(req);
173  talloc_zfree(req);
174  task->req = NULL;
175  switch (ret) {
176  case EOK:
177  DEBUG(SSSDBG_TRACE_FUNC, "Task [%s]: finished successfully\n",
178  task->name);
179 
181  break;
182  default:
183  DEBUG(SSSDBG_OP_FAILURE, "Task [%s]: failed with [%d]: %s\n",
184  task->name, ret, sss_strerror(ret));
185 
187  break;
188  }
189 }
190 
191 static void be_ptask_schedule(struct be_ptask *task,
192  enum be_ptask_delay delay_type,
193  uint32_t from)
194 {
195  struct timeval tv = { 0, };
196  time_t delay = 0;
197 
198  if (!task->enabled) {
199  DEBUG(SSSDBG_TRACE_FUNC, "Task [%s]: disabled\n", task->name);
200  return;
201  }
202 
203  switch (delay_type) {
205  delay = task->first_delay;
206  break;
208  delay = task->enabled_delay;
209  break;
210  case BE_PTASK_PERIOD:
211  if (task->flags & BE_PTASK_NO_PERIODIC) {
212  /* Periodic task is disabled, */
213  /* only online/offline change can cause some activity. */
214  return;
215  }
216 
217  delay = task->period;
218 
219  if (backoff_allowed(task) && task->period * 2 <= task->max_backoff) {
220  /* double the period for the next execution */
221  task->period *= 2;
222  }
223  break;
224  }
225 
226  /* add random offset */
227  if (task->random_offset != 0) {
228  delay = delay + (sss_rand() % task->random_offset);
229  }
230 
231  if(from & BE_PTASK_SCHEDULE_FROM_NOW) {
232  tv = tevent_timeval_current_ofs(delay, 0);
233 
234  DEBUG(SSSDBG_TRACE_FUNC, "Task [%s]: scheduling task %lu seconds "
235  "from now [%lu]\n", task->name, delay, tv.tv_sec);
236  }
237  else if (from & BE_PTASK_SCHEDULE_FROM_LAST) {
238  tv = tevent_timeval_set(task->last_execution + delay, 0);
239 
240  DEBUG(SSSDBG_TRACE_FUNC, "Task [%s]: scheduling task %lu seconds "
241  "from last execution time [%lu]\n",
242  task->name, delay, tv.tv_sec);
243  }
244 
245  if (task->timer != NULL) {
246  DEBUG(SSSDBG_MINOR_FAILURE, "Task [%s]: another timer is already "
247  "active?\n", task->name);
248  talloc_zfree(task->timer);
249  }
250 
251  task->timer = tevent_add_timer(task->ev, task, tv, be_ptask_execute, task);
252  if (task->timer == NULL) {
253  /* nothing we can do about it */
254  DEBUG(SSSDBG_CRIT_FAILURE, "FATAL: Unable to schedule task [%s]\n",
255  task->name);
256  be_ptask_disable(task);
257  }
258 
259  task->next_execution = tv.tv_sec;
260 }
261 
262 static unsigned int be_ptask_flag_bits(uint32_t flags)
263 {
264  unsigned int cnt = 0;
265  while (flags != 0) {
266  cnt += flags & 1;
267  flags >>= 1;
268  }
269  return cnt;
270 }
271 
272 static int be_ptask_flag_check(uint32_t flags)
273 {
274  uint32_t tmpflags;
275 
276  tmpflags = flags & (BE_PTASK_SCHEDULE_FROM_LAST |
278  if (be_ptask_flag_bits(tmpflags) != 1) {
279  return EINVAL;
280  }
281 
282  tmpflags = flags & (BE_PTASK_OFFLINE_SKIP |
285  if (be_ptask_flag_bits(tmpflags) != 1) {
286  return EINVAL;
287  }
288 
289  return EOK;
290 }
291 
292 errno_t be_ptask_create(TALLOC_CTX *mem_ctx,
293  struct be_ctx *be_ctx,
294  time_t period,
295  time_t first_delay,
296  time_t enabled_delay,
297  time_t random_offset,
298  time_t timeout,
299  time_t max_backoff,
300  be_ptask_send_t send_fn,
301  be_ptask_recv_t recv_fn,
302  void *pvt,
303  const char *name,
304  uint32_t flags,
305  struct be_ptask **_task)
306 {
307  struct be_ptask *task = NULL;
308  errno_t ret;
309 
310  if (be_ctx == NULL || send_fn == NULL || recv_fn == NULL
311  || name == NULL) {
312  return EINVAL;
313  }
314 
315  if (period == 0 && (flags & BE_PTASK_NO_PERIODIC) == 0) {
316  return EINVAL;
317  }
318 
319  /* check flags, some of them are exclusive, some must be present */
321  if (ret != EOK) {
322  return ret;
323  }
324 
325  task = talloc_zero(mem_ctx, struct be_ptask);
326  if (task == NULL) {
327  ret = ENOMEM;
328  goto done;
329  }
330 
331  task->ev = be_ctx->ev;
332  task->be_ctx = be_ctx;
333  task->period = period;
334  task->orig_period = period;
335  task->first_delay = first_delay;
338  task->max_backoff = max_backoff;
339  task->timeout = timeout;
340  task->send_fn = send_fn;
341  task->recv_fn = recv_fn;
342  task->pvt = pvt;
343  task->name = talloc_strdup(task, name);
344  if (task->name == NULL) {
345  ret = ENOMEM;
346  goto done;
347  }
348 
349  task->flags = flags;
350  task->enabled = true;
351 
352  talloc_set_destructor((TALLOC_CTX*)task, be_ptask_destructor);
353 
355  /* install offline and online callbacks */
357  if (ret != EOK) {
359  "Unable to install online callback [%d]: %s\n",
360  ret, sss_strerror(ret));
361  goto done;
362  }
363 
365  if (ret != EOK) {
367  "Unable to install offline callback [%d]: %s\n",
368  ret, sss_strerror(ret));
369  goto done;
370  }
371  }
372 
373  DEBUG(SSSDBG_TRACE_FUNC, "Periodic task [%s] was created\n", task->name);
374 
376 
377  if (_task != NULL) {
378  *_task = task;
379  }
380 
381  ret = EOK;
382 
383 done:
384  if (ret != EOK) {
385  talloc_free(task);
386  }
387 
388  return ret;
389 }
390 
391 void be_ptask_enable(struct be_ptask *task)
392 {
393  if (task != NULL) {
394  if (task->enabled) {
395  DEBUG(SSSDBG_MINOR_FAILURE, "Task [%s]: already enabled\n",
396  task->name);
397  return;
398  }
399 
400  DEBUG(SSSDBG_TRACE_FUNC, "Task [%s]: enabling task\n", task->name);
401 
402  task->enabled = true;
405  }
406 }
407 
408 /* Disable the task, but if a request already in progress, let it finish. */
409 void be_ptask_disable(struct be_ptask *task)
410 {
411  if (task != NULL) {
412  DEBUG(SSSDBG_TRACE_FUNC, "Task [%s]: disabling task\n", task->name);
413 
414  talloc_zfree(task->timer);
415  task->enabled = false;
416  task->period = task->orig_period;
417  }
418 }
419 
420 void be_ptask_destroy(struct be_ptask **task)
421 {
422  talloc_zfree(*task);
423 }
424 
425 time_t be_ptask_get_period(struct be_ptask *task)
426 {
427  return task->period;
428 }
429 
430 time_t be_ptask_get_timeout(struct be_ptask *task)
431 {
432  return task->timeout;
433 }
434 
437  void *pvt;
438 };
439 
441  int dummy;
442 };
443 
444 /* This is not an asynchronous request so there is not any _done function. */
445 static struct tevent_req *
446 be_ptask_sync_send(TALLOC_CTX *mem_ctx,
447  struct tevent_context *ev,
448  struct be_ctx *be_ctx,
449  struct be_ptask *be_ptask,
450  void *pvt)
451 {
452  struct be_ptask_sync_ctx *ctx = NULL;
453  struct be_ptask_sync_state *state = NULL;
454  struct tevent_req *req = NULL;
455  errno_t ret;
456 
457  req = tevent_req_create(mem_ctx, &state, struct be_ptask_sync_state);
458  if (req == NULL) {
459  DEBUG(SSSDBG_CRIT_FAILURE, "tevent_req_create() failed\n");
460  return NULL;
461  }
462 
463  ctx = talloc_get_type(pvt, struct be_ptask_sync_ctx);
464  ret = ctx->fn(mem_ctx, ev, be_ctx, be_ptask, ctx->pvt);
465 
466  if (ret == EOK) {
467  tevent_req_done(req);
468  } else {
469  tevent_req_error(req, ret);
470  }
471  tevent_req_post(req, ev);
472 
473  return req;
474 }
475 
476 static errno_t be_ptask_sync_recv(struct tevent_req *req)
477 {
479 
480  return EOK;
481 }
482 
483 errno_t be_ptask_create_sync(TALLOC_CTX *mem_ctx,
484  struct be_ctx *be_ctx,
485  time_t period,
486  time_t first_delay,
487  time_t enabled_delay,
488  time_t random_offset,
489  time_t timeout,
490  time_t max_backoff,
491  be_ptask_sync_t fn,
492  void *pvt,
493  const char *name,
494  uint32_t flags,
495  struct be_ptask **_task)
496 {
497  errno_t ret;
498  struct be_ptask_sync_ctx *ctx = NULL;
499 
500  ctx = talloc_zero(mem_ctx, struct be_ptask_sync_ctx);
501  if (ctx == NULL) {
502  ret = ENOMEM;
503  goto done;
504  }
505 
506  ctx->fn = fn;
507  ctx->pvt = pvt;
508 
509  ret = be_ptask_create(mem_ctx, be_ctx, period, first_delay,
510  enabled_delay, random_offset, timeout,
513  _task);
514  if (ret != EOK) {
515  goto done;
516  }
517 
518  talloc_steal(*_task, ctx);
519 
520  ret = EOK;
521 
522 done:
523  if (ret != EOK) {
524  talloc_free(ctx);
525  }
526 
527  return ret;
528 }
be_is_offline
bool be_is_offline(struct be_ctx *ctx)
Definition: data_provider_be.c:75
be_ptask.h
be_add_online_cb
int be_add_online_cb(TALLOC_CTX *mem_ctx, struct be_ctx *ctx, be_callback_t cb, void *pvt, struct be_cb **online_cb)
Definition: data_provider_callbacks.c:195
be_ptask_sync_ctx::pvt
void * pvt
Definition: be_ptask.c:437
sss_strerror
const char * sss_strerror(errno_t error)
return a string describing the error number like strerror()
Definition: util_errors.c:150
BE_PTASK_SCHEDULE_FROM_LAST
#define BE_PTASK_SCHEDULE_FROM_LAST
Definition: be_ptask.h:48
be_ptask_enable
void be_ptask_enable(struct be_ptask *task)
Definition: be_ptask.c:391
be_ptask::recv_fn
be_ptask_recv_t recv_fn
Definition: be_ptask_private.h:34
be_ptask_sync_ctx
Definition: be_ptask.c:435
EOK
#define EOK
Definition: hbac_evaluator.c:40
BE_PTASK_OFFLINE_EXECUTE
#define BE_PTASK_OFFLINE_EXECUTE
Definition: be_ptask.h:58
be_ptask_done
static void be_ptask_done(struct tevent_req *req)
Definition: be_ptask.c:165
be_ptask_sync_send
static struct tevent_req * be_ptask_sync_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct be_ctx *be_ctx, struct be_ptask *be_ptask, void *pvt)
Definition: be_ptask.c:446
be_ptask_destroy
void be_ptask_destroy(struct be_ptask **task)
Definition: be_ptask.c:420
be_ptask_create
errno_t be_ptask_create(TALLOC_CTX *mem_ctx, struct be_ctx *be_ctx, time_t period, time_t first_delay, time_t enabled_delay, time_t random_offset, time_t timeout, time_t max_backoff, be_ptask_send_t send_fn, be_ptask_recv_t recv_fn, void *pvt, const char *name, uint32_t flags, struct be_ptask **_task)
The first execution is scheduled first_delay seconds after the task is created.
Definition: be_ptask.c:292
BE_PTASK_SCHEDULE_FROM_NOW
#define BE_PTASK_SCHEDULE_FROM_NOW
Flags defining the starting point for scheduling a task.
Definition: be_ptask.h:46
BE_PTASK_OFFLINE_SKIP
#define BE_PTASK_OFFLINE_SKIP
Flags defining how should task behave when back end is offline.
Definition: be_ptask.h:54
be_ptask::ev
struct tevent_context * ev
Definition: be_ptask_private.h:25
sss_rand
int sss_rand(void)
Definition: util.c:1062
be_ptask::enabled
bool enabled
Definition: be_ptask_private.h:44
be_ptask_sync_recv
static errno_t be_ptask_sync_recv(struct tevent_req *req)
Definition: be_ptask.c:476
be_ptask_create_sync
errno_t be_ptask_create_sync(TALLOC_CTX *mem_ctx, struct be_ctx *be_ctx, time_t period, time_t first_delay, time_t enabled_delay, time_t random_offset, time_t timeout, time_t max_backoff, be_ptask_sync_t fn, void *pvt, const char *name, uint32_t flags, struct be_ptask **_task)
Definition: be_ptask.c:483
be_ptask_private.h
be_ptask::name
const char * name
Definition: be_ptask_private.h:36
be_ptask_delay
be_ptask_delay
Definition: be_ptask.c:34
be_ptask::period
time_t period
Definition: be_ptask_private.h:38
BE_PTASK_OFFLINE_DISABLE
#define BE_PTASK_OFFLINE_DISABLE
Definition: be_ptask.h:56
DEBUG
#define DEBUG(level, format,...)
macro to generate debug messages
Definition: debug.h:123
be_ptask_get_period
time_t be_ptask_get_period(struct be_ptask *task)
Definition: be_ptask.c:425
SSSDBG_TRACE_FUNC
#define SSSDBG_TRACE_FUNC
Definition: debug.h:80
BE_PTASK_FIRST_DELAY
@ BE_PTASK_FIRST_DELAY
Definition: be_ptask.c:35
be_ptask::req
struct tevent_req * req
Definition: be_ptask_private.h:41
be_ptask::orig_period
time_t orig_period
Definition: be_ptask_private.h:27
be_ptask_online_cb
static void be_ptask_online_cb(void *pvt)
Definition: be_ptask.c:59
be_ptask_sync_t
errno_t(* be_ptask_sync_t)(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct be_ctx *be_ctx, struct be_ptask *be_ptask, void *pvt)
If EOK, task will be scheduled again to 'last_execution_time + period'.
Definition: be_ptask.h:79
errno_t
int errno_t
Definition: hbac_evaluator.c:36
be_ctx::ev
struct tevent_context * ev
Definition: backend.h:76
be_ptask::be_ctx
struct be_ctx * be_ctx
Definition: be_ptask_private.h:26
SSSDBG_FATAL_FAILURE
#define SSSDBG_FATAL_FAILURE
Definition: debug.h:74
be_ptask_sync_ctx::fn
be_ptask_sync_t fn
Definition: be_ptask.c:436
be_ptask
Definition: be_ptask_private.h:24
name
const char * name
Definition: sbus_errors.c:30
be_ptask::timer
struct tevent_timer * timer
Definition: be_ptask_private.h:42
sss_crypto.h
be_ptask::max_backoff
time_t max_backoff
Definition: be_ptask_private.h:32
BE_PTASK_NO_PERIODIC
#define BE_PTASK_NO_PERIODIC
Do not schedule periodic task.
Definition: be_ptask.h:39
be_ptask_flag_bits
static unsigned int be_ptask_flag_bits(uint32_t flags)
Definition: be_ptask.c:262
be_ptask_flag_check
static int be_ptask_flag_check(uint32_t flags)
Definition: be_ptask.c:272
be_ptask_sync_state
Definition: be_ptask.c:440
be_ptask_recv_t
errno_t(* be_ptask_recv_t)(struct tevent_req *req)
If EOK, task will be scheduled again to 'last_execution_time + period'.
Definition: be_ptask.h:72
be_ptask::random_offset
time_t random_offset
Definition: be_ptask_private.h:30
ctx
struct nss_ops_ctx * ctx
Definition: wbc_pwd_sssd.c:61
be_ptask_get_timeout
time_t be_ptask_get_timeout(struct be_ptask *task)
Definition: be_ptask.c:430
be_ptask::send_fn
be_ptask_send_t send_fn
Definition: be_ptask_private.h:33
backend.h
be_ptask_schedule
static void be_ptask_schedule(struct be_ptask *task, enum be_ptask_delay delay_type, uint32_t from)
Definition: be_ptask.c:191
be_add_offline_cb
int be_add_offline_cb(TALLOC_CTX *mem_ctx, struct be_ctx *ctx, be_callback_t cb, void *pvt, struct be_cb **online_cb)
Definition: data_provider_callbacks.c:265
be_ptask::enabled_delay
time_t enabled_delay
Definition: be_ptask_private.h:29
be_ptask_send_t
struct tevent_req *(* be_ptask_send_t)(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct be_ctx *be_ctx, struct be_ptask *be_ptask, void *pvt)
Definition: be_ptask.h:61
be_ptask::last_execution
time_t last_execution
Definition: be_ptask_private.h:40
be_ptask::pvt
void * pvt
Definition: be_ptask_private.h:35
be_ptask::timeout
time_t timeout
Definition: be_ptask_private.h:31
be_ptask::next_execution
time_t next_execution
Definition: be_ptask_private.h:39
talloc_zfree
#define talloc_zfree(ptr)
Definition: util.h:121
be_ptask_disable
void be_ptask_disable(struct be_ptask *task)
Definition: be_ptask.c:409
SSSDBG_MINOR_FAILURE
#define SSSDBG_MINOR_FAILURE
Definition: debug.h:77
be_ptask_offline_cb
static void be_ptask_offline_cb(void *pvt)
Definition: be_ptask.c:73
be_ptask::flags
uint32_t flags
Definition: be_ptask_private.h:43
be_ptask_sync_state::dummy
int dummy
Definition: be_ptask.c:441
SSSDBG_CRIT_FAILURE
#define SSSDBG_CRIT_FAILURE
Definition: debug.h:75
be_ptask::first_delay
time_t first_delay
Definition: be_ptask_private.h:28
TEVENT_REQ_RETURN_ON_ERROR
#define TEVENT_REQ_RETURN_ON_ERROR(req)
Definition: util.h:132
be_ctx
Definition: backend.h:75
be_ptask_timeout
static void be_ptask_timeout(struct tevent_context *ev, struct tevent_timer *tt, struct timeval tv, void *pvt)
Definition: be_ptask.c:82
BE_PTASK_PERIOD
@ BE_PTASK_PERIOD
Definition: be_ptask.c:37
NULL
#define NULL
Definition: util.h:67
SSSDBG_OP_FAILURE
#define SSSDBG_OP_FAILURE
Definition: debug.h:76
backoff_allowed
#define backoff_allowed(ptask)
Definition: be_ptask.c:32
util.h
ret
errno_t ret
Definition: sbus_errors.c:31
be_ptask_destructor
static int be_ptask_destructor(void *pvt)
Definition: be_ptask.c:44
be_ptask_execute
static void be_ptask_execute(struct tevent_context *ev, struct tevent_timer *tt, struct timeval tv, void *pvt)
Definition: be_ptask.c:98
BE_PTASK_ENABLED_DELAY
@ BE_PTASK_ENABLED_DELAY
Definition: be_ptask.c:36