summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/smbd/service.c5
-rw-r--r--source4/smbd/service.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/source4/smbd/service.c b/source4/smbd/service.c
index d55f1ab0d4..fac0e175a1 100644
--- a/source4/smbd/service.c
+++ b/source4/smbd/service.c
@@ -294,7 +294,10 @@ void server_idle_handler(struct event_context *ev, struct timed_event *idle,
conn->event.idle->next_event = timeval_sum(&t, &conn->event.idle_time);
- conn->service->ops->idle_handler(conn, t);
+ /* Not all services provide an idle handler */
+ if (conn->service->ops->idle_handler) {
+ conn->service->ops->idle_handler(conn, t);
+ }
}
/*
return the operations structure for a named backend of the specified type
diff --git a/source4/smbd/service.h b/source4/smbd/service.h
index 5bb43a74fa..20bf6e9b8f 100644
--- a/source4/smbd/service.h
+++ b/source4/smbd/service.h
@@ -47,13 +47,11 @@ struct server_service_ops {
/* function to accept new connection */
void (*accept_connection)(struct server_connection *);
- /* function to accept new connection */
void (*recv_handler)(struct server_connection *, struct timeval, uint16_t);
- /* function to accept new connection */
void (*send_handler)(struct server_connection *, struct timeval, uint16_t);
- /* function to accept new connection */
+ /* function to be called when the server is idle */
void (*idle_handler)(struct server_connection *, struct timeval);
/* function to close a connection */