mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
r4667: Don't follow a NULL pointer for an idle event handler.
Fix up some header comments. Andrew Bartlett (This used to be commit 62005a3924e2af52c7173098b0b38eca14e03609)
This commit is contained in:
parent
a36f456adf
commit
fdfa2adcb1
@ -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
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user