svn commit: samba r4667 - in branches/SAMBA_4_0/source/smbd: .
abartlet at samba.org
abartlet at samba.org
Tue Jan 11 02:18:43 GMT 2005
Author: abartlet
Date: 2005-01-11 02:18:42 +0000 (Tue, 11 Jan 2005)
New Revision: 4667
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4667
Log:
Don't follow a NULL pointer for an idle event handler.
Fix up some header comments.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/smbd/service.c
branches/SAMBA_4_0/source/smbd/service.h
Changeset:
Modified: branches/SAMBA_4_0/source/smbd/service.c
===================================================================
--- branches/SAMBA_4_0/source/smbd/service.c 2005-01-11 02:13:09 UTC (rev 4666)
+++ branches/SAMBA_4_0/source/smbd/service.c 2005-01-11 02:18:42 UTC (rev 4667)
@@ -294,7 +294,10 @@
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
Modified: branches/SAMBA_4_0/source/smbd/service.h
===================================================================
--- branches/SAMBA_4_0/source/smbd/service.h 2005-01-11 02:13:09 UTC (rev 4666)
+++ branches/SAMBA_4_0/source/smbd/service.h 2005-01-11 02:18:42 UTC (rev 4667)
@@ -47,13 +47,11 @@
/* 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 */
More information about the samba-cvs
mailing list