s3:events: change event_add_timed() prototype to match samba4
authorStefan Metzmacher <metze@samba.org>
Mon, 5 Jan 2009 09:22:50 +0000 (10:22 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 5 Jan 2009 14:07:35 +0000 (15:07 +0100)
metze

18 files changed:
source3/include/event.h
source3/lib/async_req.c
source3/lib/ctdbd_conn.c
source3/lib/events.c
source3/lib/smbldap.c
source3/modules/vfs_aio_fork.c
source3/nmbd/nmbd_processlogon.c
source3/printing/notify.c
source3/rpc_server/srv_samr_nt.c
source3/smbd/blocking.c
source3/smbd/fileio.c
source3/smbd/oplock.c
source3/smbd/process.c
source3/utils/net_lua.c
source3/utils/smbcontrol.c
source3/winbindd/winbindd_cm.c
source3/winbindd/winbindd_cred_cache.c
source3/winbindd/winbindd_dual.c

index ebbf9c9f639c44b83ab6330408f7e003cb1387c7..5d8d294c00d3504cc347d9ad70535161ea96f306 100644 (file)
@@ -28,15 +28,17 @@ struct timed_event;
 
 /* The following definitions come from lib/events.c  */
 
-struct timed_event *event_add_timed(struct event_context *event_ctx,
+struct timed_event *_event_add_timed(struct event_context *event_ctx,
                                TALLOC_CTX *mem_ctx,
                                struct timeval when,
                                const char *event_name,
                                void (*handler)(struct event_context *event_ctx,
                                                struct timed_event *te,
-                                               const struct timeval *now,
+                                               struct timeval now,
                                                void *private_data),
                                void *private_data);
+#define event_add_timed(event_ctx, mem_ctx, when, handler, private_data) \
+       _event_add_timed(event_ctx, mem_ctx, when, #handler, handler, private_data)
 struct fd_event *event_add_fd(struct event_context *event_ctx,
                              TALLOC_CTX *mem_ctx,
                              int fd, uint16_t flags,
index ac06df65a3ab92e400be12e3e4b425b7b8026a11..13b64ba79aa0b071247eaeb34108d7fc70607527 100644 (file)
@@ -103,12 +103,12 @@ void async_req_error(struct async_req *req, NTSTATUS status)
  * @brief Timed event callback
  * @param[in] ev       Event context
  * @param[in] te       The timed event
- * @param[in] now      current time
+ * @param[in] now      zero time
  * @param[in] priv     The async request to be finished
  */
 
 static void async_trigger(struct event_context *ev, struct timed_event *te,
-                         const struct timeval *now, void *priv)
+                         struct timeval now, void *priv)
 {
        struct async_req *req = talloc_get_type_abort(priv, struct async_req);
 
@@ -139,7 +139,7 @@ bool async_post_status(struct async_req *req, struct event_context *ev,
 {
        req->status = status;
 
-       if (event_add_timed(ev, req, timeval_zero(), "async_trigger",
+       if (event_add_timed(ev, req, timeval_zero(),
                            async_trigger, req) == NULL) {
                return false;
        }
@@ -197,7 +197,7 @@ NTSTATUS async_req_simple_recv(struct async_req *req)
 
 static void async_req_timedout(struct event_context *ev,
                               struct timed_event *te,
-                              const struct timeval *now,
+                              struct timeval now,
                               void *priv)
 {
        struct async_req *req = talloc_get_type_abort(
@@ -211,7 +211,7 @@ bool async_req_set_timeout(struct async_req *req, struct event_context *ev,
 {
        return (event_add_timed(ev, req,
                                timeval_current_ofs(to.tv_sec, to.tv_usec),
-                               "async_req_timedout", async_req_timedout, req)
+                               async_req_timedout, req)
                != NULL);
 }
 
@@ -268,7 +268,7 @@ static int async_queue_entry_destructor(struct async_queue_entry *e)
 
 static void async_req_immediate_trigger(struct event_context *ev,
                                        struct timed_event *te,
-                                       const struct timeval *now,
+                                       struct timeval now,
                                        void *priv)
 {
        struct async_queue_entry *e = talloc_get_type_abort(
@@ -303,7 +303,6 @@ bool async_req_enqueue(struct async_req_queue *queue, struct event_context *ev,
                struct timed_event *te;
 
                te = event_add_timed(ev, e, timeval_zero(),
-                                    "async_req_immediate_trigger",
                                     async_req_immediate_trigger,
                                     e);
                if (te == NULL) {
index 75a513312e21f27d93f35f7d6af4f894f6f87f65..c94ef802c4b68a5371df2d5027698d92dca645b9 100644 (file)
@@ -200,7 +200,7 @@ struct deferred_msg_state {
 
 static void deferred_message_dispatch(struct event_context *event_ctx,
                                      struct timed_event *te,
-                                     const struct timeval *now,
+                                     struct timeval now,
                                      void *private_data)
 {
        struct deferred_msg_state *state = talloc_get_type_abort(
@@ -383,7 +383,6 @@ static NTSTATUS ctdb_read_req(struct ctdbd_connection *conn, uint32 reqid,
                evt = event_add_timed(conn->msg_ctx->event_ctx,
                                      conn->msg_ctx->event_ctx,
                                      timeval_zero(),
-                                     "deferred_message_dispatch",
                                      deferred_message_dispatch,
                                      msg_state);
                if (evt == NULL) {
index 0e3fecfaa225dc0bd83560bdc32acc4ba9200224..203cfccd1477649d2779b4f06cbb55dadb2eb070 100644 (file)
@@ -27,7 +27,7 @@ struct timed_event {
        const char *event_name;
        void (*handler)(struct event_context *event_ctx,
                        struct timed_event *te,
-                       const struct timeval *now,
+                       struct timeval now,
                        void *private_data);
        void *private_data;
 };
@@ -88,13 +88,13 @@ static void add_event_by_time(struct timed_event *te)
  handed to it.
 ****************************************************************************/
 
-struct timed_event *event_add_timed(struct event_context *event_ctx,
+struct timed_event *_event_add_timed(struct event_context *event_ctx,
                                TALLOC_CTX *mem_ctx,
                                struct timeval when,
                                const char *event_name,
                                void (*handler)(struct event_context *event_ctx,
                                                struct timed_event *te,
-                                               const struct timeval *now,
+                                               struct timeval now,
                                                void *private_data),
                                void *private_data)
 {
@@ -241,7 +241,7 @@ bool run_events(struct event_context *event_ctx,
 
                event_ctx->timed_events->handler(
                        event_ctx,
-                       event_ctx->timed_events, &now,
+                       event_ctx->timed_events, now,
                        event_ctx->timed_events->private_data);
 
                fired = True;
index f2161dc946f4f15247782248494f9051442a9166..f0561a5081ef8d8812f315cf9d4faec764c84a8e 100644 (file)
@@ -1014,7 +1014,7 @@ static int smbldap_connect_system(struct smbldap_state *ldap_state, LDAP * ldap_
 
 static void smbldap_idle_fn(struct event_context *event_ctx,
                            struct timed_event *te,
-                           const struct timeval *now,
+                           struct timeval now,
                            void *private_data);
 
 /**********************************************************************
@@ -1079,7 +1079,7 @@ static int smbldap_open(struct smbldap_state *ldap_state)
                ldap_state->idle_event = event_add_timed(
                        ldap_state->event_context, NULL,
                        timeval_current_ofs(SMBLDAP_IDLE_TIME, 0),
-                       "smbldap_idle_fn", smbldap_idle_fn, ldap_state);
+                       smbldap_idle_fn, ldap_state);
        }
 
        DEBUG(4,("The LDAP server is successfully connected\n"));
@@ -1572,7 +1572,7 @@ int smbldap_search_suffix (struct smbldap_state *ldap_state,
 
 static void smbldap_idle_fn(struct event_context *event_ctx,
                            struct timed_event *te,
-                           const struct timeval *now,
+                           struct timeval now,
                            void *private_data)
 {
        struct smbldap_state *state = (struct smbldap_state *)private_data;
@@ -1584,13 +1584,13 @@ static void smbldap_idle_fn(struct event_context *event_ctx,
                return;
        }
                
-       if ((state->last_use+SMBLDAP_IDLE_TIME) > now->tv_sec) {
+       if ((state->last_use+SMBLDAP_IDLE_TIME) > now.tv_sec) {
                DEBUG(10,("ldap connection not idle...\n"));
 
                state->idle_event = event_add_timed(
                        event_ctx, NULL,
-                       timeval_add(now, SMBLDAP_IDLE_TIME, 0),
-                       "smbldap_idle_fn", smbldap_idle_fn,
+                       timeval_add(&now, SMBLDAP_IDLE_TIME, 0),
+                       smbldap_idle_fn,
                        private_data);
                return;
        }
index 7914e8f4014519e8392c7eca6ed755746005d34f..30b14f280f2a741201c0e16d15c59b55ad73b4c4 100644 (file)
@@ -216,7 +216,7 @@ static ssize_t write_fd(int fd, void *ptr, size_t nbytes, int sendfd)
 
 static void aio_child_cleanup(struct event_context *event_ctx,
                              struct timed_event *te,
-                             const struct timeval *now,
+                             struct timeval now,
                              void *private_data)
 {
        struct aio_child_list *list = talloc_get_type_abort(
@@ -252,8 +252,7 @@ static void aio_child_cleanup(struct event_context *event_ctx,
                 * Re-schedule the next cleanup round
                 */
                list->cleanup_event = event_add_timed(smbd_event_context(), list,
-                                                     timeval_add(now, 30, 0),
-                                                     "aio_child_cleanup",
+                                                     timeval_add(&now, 30, 0),
                                                      aio_child_cleanup, list);
 
        }
@@ -284,7 +283,6 @@ static struct aio_child_list *init_aio_children(struct vfs_handle_struct *handle
        if (data->cleanup_event == NULL) {
                data->cleanup_event = event_add_timed(smbd_event_context(), data,
                                                      timeval_current_ofs(30, 0),
-                                                     "aio_child_cleanup",
                                                      aio_child_cleanup, data);
                if (data->cleanup_event == NULL) {
                        TALLOC_FREE(data);
index 565d81f82d46d409a13234a96a932bb561dba36a..a4ef528133b8b19293b3010e5d37bb13155f8852 100644 (file)
@@ -52,7 +52,7 @@ static bool delay_logon(const char *peer_name, const char *peer_addr)
 
 static void delayed_init_logon_handler(struct event_context *event_ctx,
                                       struct timed_event *te,
-                                      const struct timeval *now,
+                                      struct timeval now,
                                       void *private_data)
 {
        struct packet_struct *p = (struct packet_struct *)private_data;
@@ -657,7 +657,6 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
                                        event_add_timed(nmbd_event_context(),
                                                        NULL,
                                                        when,
-                                                       "delayed_init_logon",
                                                        delayed_init_logon_handler,
                                                        p);
                                } else {
index b24a8a52f599048961f88282669448b6631f8f8a..860a400d64902c60e9e28664c151a6ea17745706 100644 (file)
@@ -221,7 +221,7 @@ void print_notify_send_messages(struct messaging_context *msg_ctx,
 
 static void print_notify_event_send_messages(struct event_context *event_ctx,
                                        struct timed_event *te,
-                                       const struct timeval *now,
+                                       struct timeval now,
                                        void *private_data)
 {
        /* Remove this timed event handler. */
@@ -326,7 +326,6 @@ to notify_queue_head\n", msg->type, msg->field, msg->printer));
                /* Add an event for 1 second's time to send this queue. */
                notify_event = event_add_timed(smbd_event_context(), NULL,
                                        timeval_current_ofs(1,0),
-                                       "print_notify",
                                        print_notify_event_send_messages, NULL);
        }
 
index 342f432c4ef3d058c65766dacf2662e44e9ee86b..24d14d720fc23963f357c7488584a802c9043dec 100644 (file)
@@ -457,7 +457,7 @@ static void free_samr_info(void *ptr)
 
 static void disp_info_cache_idle_timeout_handler(struct event_context *ev_ctx,
                                                 struct timed_event *te,
-                                                const struct timeval *now,
+                                                struct timeval now,
                                                 void *private_data)
 {
        DISP_INFO *disp_info = (DISP_INFO *)private_data;
@@ -486,7 +486,6 @@ static void set_disp_info_cache_timeout(DISP_INFO *disp_info, time_t secs_fromno
        disp_info->cache_timeout_event = event_add_timed(
                smbd_event_context(), NULL,
                timeval_current_ofs(secs_fromnow, 0),
-               "disp_info_cache_idle_timeout_handler",
                disp_info_cache_idle_timeout_handler, (void *)disp_info);
 }
 
index 2237a89ace6be3d9e8b9df1e369a1523843cfa46..2b90d24c878ec1e328e184cc58c296d4703c92ad 100644 (file)
@@ -68,7 +68,7 @@ static void process_blocking_lock_queue(void);
 
 static void brl_timeout_fn(struct event_context *event_ctx,
                           struct timed_event *te,
-                          const struct timeval *now,
+                          struct timeval now,
                           void *private_data)
 {
        SMB_ASSERT(brl_timeout == te);
@@ -123,7 +123,7 @@ static bool recalc_brl_timeout(void)
        }
 
        if (!(brl_timeout = event_add_timed(smbd_event_context(), NULL,
-                                           next_timeout, "brl_timeout",
+                                           next_timeout,
                                            brl_timeout_fn, NULL))) {
                return False;
        }
index e67f926a049f5d4d5c3b5b44bc53ea42533e619f..30253d44664af9a9ed65382bfb67c87e2dcba75a 100644 (file)
@@ -173,7 +173,7 @@ static int wcp_file_size_change(files_struct *fsp)
 
 static void update_write_time_handler(struct event_context *ctx,
                                      struct timed_event *te,
-                                     const struct timeval *now,
+                                     struct timeval now,
                                      void *private_data)
 {
        files_struct *fsp = (files_struct *)private_data;
@@ -221,7 +221,6 @@ void trigger_write_time_update(struct files_struct *fsp)
        fsp->update_write_time_event =
                event_add_timed(smbd_event_context(), NULL,
                                timeval_current_ofs(0, delay),
-                               "update_write_time_handler",
                                update_write_time_handler, fsp);
 }
 
index 261d8fd6702def7e9dec90b875adaf2dc7832662..6efa3dcfc62e08d76a79e6f774c853e639581d9e 100644 (file)
@@ -346,7 +346,7 @@ static files_struct *initial_break_processing(struct file_id id, unsigned long f
 
 static void oplock_timeout_handler(struct event_context *ctx,
                                   struct timed_event *te,
-                                  const struct timeval *now,
+                                  struct timeval now,
                                   void *private_data)
 {
        files_struct *fsp = (files_struct *)private_data;
@@ -373,7 +373,6 @@ static void add_oplock_timeout_handler(files_struct *fsp)
        fsp->oplock_timeout =
                event_add_timed(smbd_event_context(), NULL,
                                timeval_current_ofs(OPLOCK_BREAK_TIMEOUT, 0),
-                               "oplock_timeout_handler",
                                oplock_timeout_handler, fsp);
 
        if (fsp->oplock_timeout == NULL) {
index 67e6067b260667e3c64e615cb184799396a14772..cd9eaa6b1ed87915b3059e1abcf24e8b37ef2869 100644 (file)
@@ -583,26 +583,33 @@ struct idle_event {
        void *private_data;
 };
 
-static void idle_event_handler(struct event_context *ctx,
-                              struct timed_event *te,
-                              const struct timeval *now,
-                              void *private_data)
+static void smbd_idle_event_handler(struct event_context *ctx,
+                                   struct timed_event *te,
+                                   struct timeval now,
+                                   void *private_data)
 {
        struct idle_event *event =
                talloc_get_type_abort(private_data, struct idle_event);
 
        TALLOC_FREE(event->te);
 
-       if (!event->handler(now, event->private_data)) {
+       DEBUG(10,("smbd_idle_event_handler: %s %p called\n",
+                 event->name, event->te));
+
+       if (!event->handler(&now, event->private_data)) {
+               DEBUG(10,("smbd_idle_event_handler: %s %p stopped\n",
+                         event->name, event->te));
                /* Don't repeat, delete ourselves */
                TALLOC_FREE(event);
                return;
        }
 
+       DEBUG(10,("smbd_idle_event_handler: %s %p rescheduled\n",
+                 event->name, event->te));
+
        event->te = event_add_timed(ctx, event,
-                                   timeval_sum(now, &event->interval),
-                                   event->name,
-                                   idle_event_handler, event);
+                                   timeval_sum(&now, &event->interval),
+                                   smbd_idle_event_handler, event);
 
        /* We can't do much but fail here. */
        SMB_ASSERT(event->te != NULL);
@@ -637,14 +644,14 @@ struct idle_event *event_add_idle(struct event_context *event_ctx,
 
        result->te = event_add_timed(event_ctx, result,
                                     timeval_sum(&now, &interval),
-                                    result->name,
-                                    idle_event_handler, result);
+                                    smbd_idle_event_handler, result);
        if (result->te == NULL) {
                DEBUG(0, ("event_add_timed failed\n"));
                TALLOC_FREE(result);
                return NULL;
        }
 
+       DEBUG(10,("event_add_idle: %s %p\n", result->name, result->te));
        return result;
 }
 
index 3a5d1bdeb676426fe681140469be716bfc62c49b..e4af9b55777bc2e6be2a2d7e2d8a08a96fca2fce 100644 (file)
@@ -248,7 +248,7 @@ static int evt_userdata_tostring(lua_State *L) {
 
 static void evt_userdata_sleep_done(struct event_context *event_ctx,
                                   struct timed_event *te,
-                                  const struct timeval *now,
+                                  struct timeval now,
                                   void *priv)
 {
        struct thread_reference *ref = talloc_get_type_abort(
@@ -279,7 +279,7 @@ static int evt_userdata_sleep(lua_State *L)
        }
 
        te = event_add_timed(p->ev, ref, timeval_current_ofs(0, usecs),
-                            "evt_userdata_sleep", evt_userdata_sleep_done,
+                            evt_userdata_sleep_done,
                             ref);
 
        if (te == NULL) {
index 9d571f7ee39c7e62795fa5b62dcafd51b2be934e..330e7643cdf44323d9d6504d12b047aa5b714dc5 100644 (file)
@@ -65,9 +65,9 @@ static bool send_message(struct messaging_context *msg_ctx,
        return ret;
 }
 
-static void timeout_handler(struct event_context *event_ctx,
+static void smbcontrol_timeout(struct event_context *event_ctx,
                            struct timed_event *te,
-                           const struct timeval *now,
+                           struct timeval now,
                            void *private_data)
 {
        bool *timed_out = (bool *)private_data;
@@ -85,8 +85,7 @@ static void wait_replies(struct messaging_context *msg_ctx,
 
        if (!(te = event_add_timed(messaging_event_context(msg_ctx), NULL,
                                   timeval_current_ofs(timeout, 0),
-                                  "smbcontrol_timeout",
-                                  timeout_handler, (void *)&timed_out))) {
+                                  smbcontrol_timeout, (void *)&timed_out))) {
                DEBUG(0, ("event_add_timed failed\n"));
                return;
        }
index b2b7628873dcafe23748dfcc98c9b1c562f39b34..e5e356560453d90fc9a94b2c40823af8fea8f247 100644 (file)
@@ -272,7 +272,7 @@ static bool fork_child_dc_connect(struct winbindd_domain *domain)
 
 static void check_domain_online_handler(struct event_context *ctx,
                                        struct timed_event *te,
-                                       const struct timeval *now,
+                                       struct timeval now,
                                        void *private_data)
 {
         struct winbindd_domain *domain =
@@ -286,7 +286,7 @@ static void check_domain_online_handler(struct event_context *ctx,
 
        /* Are we still in "startup" mode ? */
 
-       if (domain->startup && (now->tv_sec > domain->startup_time + 30)) {
+       if (domain->startup && (now.tv_sec > domain->startup_time + 30)) {
                /* No longer in "startup" mode. */
                DEBUG(10,("check_domain_online_handler: domain %s no longer in 'startup' mode.\n",
                        domain->name ));
@@ -367,7 +367,6 @@ void set_domain_offline(struct winbindd_domain *domain)
        domain->check_online_event = event_add_timed(winbind_event_context(),
                                                NULL,
                                                timeval_current_ofs(domain->check_online_timeout,0),
-                                               "check_domain_online_handler",
                                                check_domain_online_handler,
                                                domain);
 
@@ -518,7 +517,6 @@ void set_domain_online_request(struct winbindd_domain *domain)
        domain->check_online_event = event_add_timed(winbind_event_context(),
                                                     NULL,
                                                     tev,
-                                                    "check_domain_online_handler",
                                                     check_domain_online_handler,
                                                     domain);
 
index c869544048755b53bc700957b37e5e26e318eafb..900f9acdfabe4d7499e2d6a86f3d3576a9b6a1e0 100644 (file)
@@ -36,7 +36,7 @@
 static struct WINBINDD_CCACHE_ENTRY *ccache_list;
 static void krb5_ticket_gain_handler(struct event_context *,
                                     struct timed_event *,
-                                    const struct timeval *,
+                                    struct timeval,
                                     void *);
 
 /* The Krb5 ticket refresh handler should be scheduled
@@ -95,7 +95,7 @@ void ccache_remove_all_after_fork(void)
 
 static void krb5_ticket_refresh_handler(struct event_context *event_ctx,
                                        struct timed_event *te,
-                                       const struct timeval *now,
+                                       struct timeval now,
                                        void *private_data)
 {
        struct WINBINDD_CCACHE_ENTRY *entry =
@@ -163,7 +163,6 @@ rekinit:
                                        entry->event = event_add_timed(winbind_event_context(),
                                                                       entry, 
                                                                       timeval_set(new_start, 0),
-                                                                      "krb5_ticket_gain_handler",
                                                                       krb5_ticket_gain_handler,
                                                                       entry);
                                        return;
@@ -242,7 +241,6 @@ rekinit:
                        entry->event = event_add_timed(winbind_event_context(),
                                                        entry,
                                                        timeval_set(new_start, 0),
-                                                       "krb5_ticket_gain_handler",
                                                        krb5_ticket_gain_handler,
                                                        entry);
                        return;
@@ -275,7 +273,6 @@ done:
                expire_time -= 10;
                entry->event = event_add_timed(winbind_event_context(), entry,
                                                timeval_set(expire_time, 0),
-                                               "krb5_ticket_gain_handler",
                                                krb5_ticket_gain_handler,
                                                entry);
                return;
@@ -286,7 +283,6 @@ done:
        }
        entry->event = event_add_timed(winbind_event_context(), entry,
                                       timeval_set(new_start, 0),
-                                      "krb5_ticket_refresh_handler",
                                       krb5_ticket_refresh_handler,
                                       entry);
 
@@ -299,7 +295,7 @@ done:
 
 static void krb5_ticket_gain_handler(struct event_context *event_ctx,
                                     struct timed_event *te,
-                                    const struct timeval *now,
+                                    struct timeval now,
                                     void *private_data)
 {
        struct WINBINDD_CCACHE_ENTRY *entry =
@@ -375,7 +371,6 @@ static void krb5_ticket_gain_handler(struct event_context *event_ctx,
        entry->event = event_add_timed(winbind_event_context(),
                                       entry,
                                       t,
-                                      "krb5_ticket_gain_handler",
                                       krb5_ticket_gain_handler,
                                       entry);
 
@@ -395,7 +390,6 @@ static void krb5_ticket_gain_handler(struct event_context *event_ctx,
        entry->event = event_add_timed(winbind_event_context(),
                                       entry,
                                       t,
-                                      "krb5_ticket_refresh_handler",
                                       krb5_ticket_refresh_handler,
                                       entry);
 
@@ -419,14 +413,12 @@ void ccache_regain_all_now(void)
                        new_event = event_add_timed(winbind_event_context(),
                                                    cur,
                                                    t,
-                                                   "krb5_ticket_gain_handler",
                                                    krb5_ticket_gain_handler,
                                                    cur);
                } else {
                        new_event = event_add_timed(winbind_event_context(),
                                                    cur,
                                                    t,
-                                                   "krb5_ticket_refresh_handler",
                                                    krb5_ticket_refresh_handler,
                                                    cur);
                }
@@ -556,7 +548,6 @@ NTSTATUS add_ccache_to_list(const char *princ_name,
                                entry->event = event_add_timed(winbind_event_context(),
                                                               entry,
                                                               t,
-                                                              "krb5_ticket_gain_handler",
                                                               krb5_ticket_gain_handler,
                                                               entry);
                        } else {
@@ -569,7 +560,6 @@ NTSTATUS add_ccache_to_list(const char *princ_name,
                                entry->event = event_add_timed(winbind_event_context(),
                                                               entry,
                                                               t,
-                                                              "krb5_ticket_refresh_handler",
                                                               krb5_ticket_refresh_handler,
                                                               entry);
                        }
@@ -644,7 +634,6 @@ NTSTATUS add_ccache_to_list(const char *princ_name,
                entry->event = event_add_timed(winbind_event_context(),
                                               entry,
                                               t,
-                                              "krb5_ticket_gain_handler",
                                               krb5_ticket_gain_handler,
                                               entry);
        } else {
@@ -660,7 +649,6 @@ NTSTATUS add_ccache_to_list(const char *princ_name,
                entry->event = event_add_timed(winbind_event_context(),
                                               entry,
                                               t,
-                                              "krb5_ticket_refresh_handler",
                                               krb5_ticket_refresh_handler,
                                               entry);
        }
index b6af796a87dbcbe67f4a372289d26302296abc59..1499141c34f74b837f90c20c6b89a2237cd3bfa4 100644 (file)
@@ -175,7 +175,7 @@ static void async_main_request_sent(void *private_data, bool success)
 
 static void async_request_timeout_handler(struct event_context *ctx,
                                        struct timed_event *te,
-                                       const struct timeval *now,
+                                       struct timeval now,
                                        void *private_data)
 {
        struct winbindd_async_request *state =
@@ -247,7 +247,6 @@ static void async_request_sent(void *private_data_data, bool success)
        state->reply_timeout_event = event_add_timed(winbind_event_context(),
                                                        NULL,
                                                        timeval_current_ofs(300,0),
-                                                       "async_request_timeout",
                                                        async_request_timeout_handler,
                                                        state);
        if (!state->reply_timeout_event) {
@@ -827,7 +826,7 @@ void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
 
 static void account_lockout_policy_handler(struct event_context *ctx,
                                           struct timed_event *te,
-                                          const struct timeval *now,
+                                          struct timeval now,
                                           void *private_data)
 {
        struct winbindd_child *child =
@@ -866,7 +865,6 @@ static void account_lockout_policy_handler(struct event_context *ctx,
 
        child->lockout_policy_event = event_add_timed(winbind_event_context(), NULL,
                                                      timeval_current_ofs(3600, 0),
-                                                     "account_lockout_policy_handler",
                                                      account_lockout_policy_handler,
                                                      child);
 }
@@ -919,7 +917,7 @@ static bool calculate_next_machine_pwd_change(const char *domain,
 
 static void machine_password_change_handler(struct event_context *ctx,
                                            struct timed_event *te,
-                                           const struct timeval *now,
+                                           struct timeval now,
                                            void *private_data)
 {
        struct winbindd_child *child =
@@ -971,7 +969,6 @@ static void machine_password_change_handler(struct event_context *ctx,
 
        child->machine_password_change_event = event_add_timed(winbind_event_context(), NULL,
                                                              next_change,
-                                                             "machine_password_change_handler",
                                                              machine_password_change_handler,
                                                              child);
 }
@@ -1293,7 +1290,6 @@ static bool fork_domain_child(struct winbindd_child *child)
 
                child->lockout_policy_event = event_add_timed(
                        winbind_event_context(), NULL, timeval_zero(),
-                       "account_lockout_policy_handler",
                        account_lockout_policy_handler,
                        child);
        }
@@ -1308,7 +1304,6 @@ static bool fork_domain_child(struct winbindd_child *child)
                                                       &next_change)) {
                        child->machine_password_change_event = event_add_timed(
                                winbind_event_context(), NULL, next_change,
-                               "machine_password_change_handler",
                                machine_password_change_handler,
                                child);
                }