struct messaging_context {
struct server_id id;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct messaging_callback *callbacks;
struct messaging_backend *local;
const void *buf, size_t len,
int *n_sent);
struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
- struct event_context *ev);
+ struct tevent_context *ev);
struct server_id messaging_server_id(const struct messaging_context *msg_ctx);
int set_blocking(int fd, bool set);
NTSTATUS init_before_fork(void);
NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
bool parent_longlived);
void *malloc_(size_t size);
void *Realloc(void *p, size_t size, bool free_old_on_error);
NTSTATUS open_socket_out(const struct sockaddr_storage *pss, uint16_t port,
int timeout, int *pfd);
struct tevent_req *open_socket_out_send(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
const struct sockaddr_storage *pss,
uint16_t port,
int timeout);
NTSTATUS open_socket_out_recv(struct tevent_req *req, int *pfd);
struct tevent_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct timeval wait_time,
const struct sockaddr_storage *pss,
uint16_t port,
* Timed event handler for the deferred message
*/
-static void deferred_message_dispatch(struct event_context *event_ctx,
+static void deferred_message_dispatch(struct tevent_context *event_ctx,
struct timed_event *te,
struct timeval now,
void *private_data)
* The ctdbd socket is readable asynchronuously
*/
-static void ctdbd_socket_handler(struct event_context *event_ctx,
+static void ctdbd_socket_handler(struct tevent_context *event_ctx,
struct fd_event *event,
uint16 flags,
void *private_data)
}
struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
- struct event_context *ev)
+ struct tevent_context *ev)
{
struct messaging_context *ctx;
NTSTATUS status;
if (global_ctdb_connection_pid == 0 &&
global_ctdbd_connection == NULL) {
- struct event_context *ev;
+ struct tevent_context *ev;
struct messaging_context *msg;
ev = samba_tevent_context_init(NULL);
NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
bool parent_longlived)
{
NTSTATUS status = NT_STATUS_OK;
struct open_socket_out_state {
int fd;
- struct event_context *ev;
+ struct tevent_context *ev;
struct sockaddr_storage ss;
socklen_t salen;
uint16_t port;
**************************************************************************/
struct tevent_req *open_socket_out_send(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
const struct sockaddr_storage *pss,
uint16_t port,
int timeout)
int timeout, int *pfd)
{
TALLOC_CTX *frame = talloc_stackframe();
- struct event_context *ev;
+ struct tevent_context *ev;
struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY;
}
struct open_socket_out_defer_state {
- struct event_context *ev;
+ struct tevent_context *ev;
struct sockaddr_storage ss;
uint16_t port;
int timeout;
static void open_socket_out_defer_connected(struct tevent_req *subreq);
struct tevent_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct timeval wait_time,
const struct sockaddr_storage *pss,
uint16_t port,