summaryrefslogtreecommitdiff
path: root/server/responder/common
diff options
context:
space:
mode:
Diffstat (limited to 'server/responder/common')
-rw-r--r--server/responder/common/responder_cmd.c2
-rw-r--r--server/responder/common/responder_cmd.h4
-rw-r--r--server/responder/common/responder_common.c32
-rw-r--r--server/responder/common/responder_common.h4
-rw-r--r--server/responder/common/responder_dp.c12
5 files changed, 27 insertions, 27 deletions
diff --git a/server/responder/common/responder_cmd.c b/server/responder/common/responder_cmd.c
index 83d55e65..f3fbf479 100644
--- a/server/responder/common/responder_cmd.c
+++ b/server/responder/common/responder_cmd.c
@@ -28,7 +28,7 @@ void sss_cmd_done(struct sss_cmd_ctx *nctx)
{
/* now that the packet is in place, unlock queue
* making the event writable */
- EVENT_FD_WRITEABLE(nctx->cctx->cfde);
+ TEVENT_FD_WRITEABLE(nctx->cctx->cfde);
/* free all request related data through the talloc hierarchy */
talloc_free(nctx);
diff --git a/server/responder/common/responder_cmd.h b/server/responder/common/responder_cmd.h
index ee094ad3..98a4b34e 100644
--- a/server/responder/common/responder_cmd.h
+++ b/server/responder/common/responder_cmd.h
@@ -41,10 +41,10 @@ struct cli_request {
};
struct cli_ctx {
- struct event_context *ev;
+ struct tevent_context *ev;
struct nss_ctx *nctx;
int cfd;
- struct fd_event *cfde;
+ struct tevent_fd *cfde;
struct sockaddr_un addr;
struct cli_request *creq;
struct getent_ctx *gctx;
diff --git a/server/responder/common/responder_common.c b/server/responder/common/responder_common.c
index b5db7d1e..74e03215 100644
--- a/server/responder/common/responder_common.c
+++ b/server/responder/common/responder_common.c
@@ -65,7 +65,7 @@ static int client_destructor(struct cli_ctx *ctx)
return 0;
}
-static void client_send(struct event_context *ev, struct cli_ctx *cctx)
+static void client_send(struct tevent_context *ev, struct cli_ctx *cctx)
{
int ret;
@@ -81,14 +81,14 @@ static void client_send(struct event_context *ev, struct cli_ctx *cctx)
}
/* ok all sent */
- EVENT_FD_NOT_WRITEABLE(cctx->cfde);
- EVENT_FD_READABLE(cctx->cfde);
+ TEVENT_FD_NOT_WRITEABLE(cctx->cfde);
+ TEVENT_FD_READABLE(cctx->cfde);
talloc_free(cctx->creq);
cctx->creq = NULL;
return;
}
-static void client_recv(struct event_context *ev, struct cli_ctx *cctx)
+static void client_recv(struct tevent_context *ev, struct cli_ctx *cctx)
{
int ret;
@@ -115,7 +115,7 @@ static void client_recv(struct event_context *ev, struct cli_ctx *cctx)
switch (ret) {
case EOK:
/* do not read anymore */
- EVENT_FD_NOT_READABLE(cctx->cfde);
+ TEVENT_FD_NOT_READABLE(cctx->cfde);
/* execute command */
ret = sss_cmd_execute(cctx, cctx->nctx->sss_cmds);
if (ret != EOK) {
@@ -148,24 +148,24 @@ static void client_recv(struct event_context *ev, struct cli_ctx *cctx)
return;
}
-static void client_fd_handler(struct event_context *ev,
- struct fd_event *fde,
+static void client_fd_handler(struct tevent_context *ev,
+ struct tevent_fd *fde,
uint16_t flags, void *ptr)
{
struct cli_ctx *cctx = talloc_get_type(ptr, struct cli_ctx);
- if (flags & EVENT_FD_READ) {
+ if (flags & TEVENT_FD_READ) {
client_recv(ev, cctx);
return;
}
- if (flags & EVENT_FD_WRITE) {
+ if (flags & TEVENT_FD_WRITE) {
client_send(ev, cctx);
return;
}
}
-static void accept_fd_handler(struct event_context *ev,
- struct fd_event *fde,
+static void accept_fd_handler(struct tevent_context *ev,
+ struct tevent_fd *fde,
uint16_t flags, void *ptr)
{
/* accept and attach new event handler */
@@ -197,8 +197,8 @@ static void accept_fd_handler(struct event_context *ev,
return;
}
- cctx->cfde = event_add_fd(ev, cctx, cctx->cfd,
- EVENT_FD_READ, client_fd_handler, cctx);
+ cctx->cfde = tevent_add_fd(ev, cctx, cctx->cfd,
+ TEVENT_FD_READ, client_fd_handler, cctx);
if (!cctx->cfde) {
close(cctx->cfd);
talloc_free(cctx);
@@ -303,8 +303,8 @@ static int set_unix_socket(struct nss_ctx *nctx)
goto failed;
}
- nctx->lfde = event_add_fd(nctx->ev, nctx, nctx->lfd,
- EVENT_FD_READ, accept_fd_handler, nctx);
+ nctx->lfde = tevent_add_fd(nctx->ev, nctx, nctx->lfd,
+ TEVENT_FD_READ, accept_fd_handler, nctx);
/* we want default permissions on created files to be very strict,
so set our umask to 0177 */
@@ -422,7 +422,7 @@ done:
}
int sss_process_init(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct confdb_ctx *cdb,
struct sbus_method sss_sbus_methods[],
struct sss_cmd_table sss_cmds[],
diff --git a/server/responder/common/responder_common.h b/server/responder/common/responder_common.h
index 433b242e..38180705 100644
--- a/server/responder/common/responder_common.h
+++ b/server/responder/common/responder_common.h
@@ -1,16 +1,16 @@
+#include "config.h"
#include "sbus/sssd_dbus.h"
#include "responder/common/responder_cmd.h"
#include "util/btreemap.h"
/* SSS_DOMAIN_DELIM can be specified in config.h */
-#include "config.h"
#ifndef SSS_DOMAIN_DELIM
#define SSS_DOMAIN_DELIM '@'
#endif
int sss_process_init(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct confdb_ctx *cdb,
struct sbus_method sss_sbus_methods[],
struct sss_cmd_table sss_cmds[],
diff --git a/server/responder/common/responder_dp.c b/server/responder/common/responder_dp.c
index a024674b..a3dace45 100644
--- a/server/responder/common/responder_dp.c
+++ b/server/responder/common/responder_dp.c
@@ -17,14 +17,14 @@ struct sss_dp_pvt_ctx {
};
static int sss_dp_conn_destructor(void *data);
-static void sss_dp_reconnect(struct event_context *ev,
- struct timed_event *te,
+static void sss_dp_reconnect(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval tv, void *data);
static void sss_dp_conn_reconnect(struct sss_dp_pvt_ctx *pvt)
{
struct nss_ctx *nctx;
- struct timed_event *te;
+ struct tevent_timer *te;
struct timeval tv;
struct sbus_method_ctx *sm_ctx;
char *sbus_address;
@@ -66,7 +66,7 @@ static void sss_dp_conn_reconnect(struct sss_dp_pvt_ctx *pvt)
tv.tv_sec = now +5;
tv.tv_usec = 0;
- te = event_add_timed(nctx->ev, nctx, tv, sss_dp_reconnect, pvt);
+ te = tevent_add_timer(nctx->ev, nctx, tv, sss_dp_reconnect, pvt);
if (te == NULL) {
DEBUG(4, ("Failed to add timed event! Giving up\n"));
} else {
@@ -75,8 +75,8 @@ static void sss_dp_conn_reconnect(struct sss_dp_pvt_ctx *pvt)
}
}
-static void sss_dp_reconnect(struct event_context *ev,
- struct timed_event *te,
+static void sss_dp_reconnect(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval tv, void *data)
{
struct sss_dp_pvt_ctx *pvt;