svn commit: samba r8872 - in trunk/source: include lib smbd
vlendec at samba.org
vlendec at samba.org
Sun Jul 31 23:53:29 GMT 2005
Author: vlendec
Date: 2005-07-31 23:53:29 +0000 (Sun, 31 Jul 2005)
New Revision: 8872
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8872
Log:
Remove some unused code
Modified:
trunk/source/include/module.h
trunk/source/lib/module.c
trunk/source/smbd/server.c
Changeset:
Modified: trunk/source/include/module.h
===================================================================
--- trunk/source/include/module.h 2005-07-31 23:49:44 UTC (rev 8871)
+++ trunk/source/include/module.h 2005-07-31 23:53:29 UTC (rev 8872)
@@ -33,6 +33,4 @@
typedef void (smb_idle_event_fn)(void **data,time_t *interval,time_t now);
-typedef void (smb_exit_event_fn)(void **data);
-
#endif /* _MODULE_H */
Modified: trunk/source/lib/module.c
===================================================================
--- trunk/source/lib/module.c 2005-07-31 23:49:44 UTC (rev 8871)
+++ trunk/source/lib/module.c 2005-07-31 23:53:29 UTC (rev 8872)
@@ -231,77 +231,3 @@
return;
}
-
-/***************************************************************************
- * This Function registers a exit event
- *
- * the registered functions are run on exit()
- * and maybe shutdown idle connections (e.g. to an LDAP server)
- ***************************************************************************/
-
-struct smb_exit_list_ent {
- struct smb_exit_list_ent *prev,*next;
- smb_event_id_t id;
- smb_exit_event_fn *fn;
- void *data;
-};
-
-static struct smb_exit_list_ent *smb_exit_event_list = NULL;
-
-smb_event_id_t smb_register_exit_event(smb_exit_event_fn *fn, void *data)
-{
- struct smb_exit_list_ent *event;
- static smb_event_id_t smb_exit_event_id = 1;
-
- if (!fn) {
- return SMB_EVENT_ID_INVALID;
- }
-
- event = SMB_MALLOC_P(struct smb_exit_list_ent);
- if (!event) {
- DEBUG(0,("malloc() failed!\n"));
- return SMB_EVENT_ID_INVALID;
- }
- event->fn = fn;
- event->data = data;
- event->id = smb_exit_event_id++;
-
- DLIST_ADD(smb_exit_event_list,event);
-
- return event->id;
-}
-
-BOOL smb_unregister_exit_event(smb_event_id_t id)
-{
- struct smb_exit_list_ent *event = smb_exit_event_list;
-
- while(event) {
- if (event->id == id) {
- DLIST_REMOVE(smb_exit_event_list,event);
- SAFE_FREE(event);
- return True;
- }
- event = event->next;
- }
-
- return False;
-}
-
-void smb_run_exit_events(void)
-{
- struct smb_exit_list_ent *event = smb_exit_event_list;
- struct smb_exit_list_ent *tmp = NULL;
-
- while (event) {
- event->fn(&event->data);
- tmp = event;
- event = event->next;
- /* exit event should only run one time :-)*/
- SAFE_FREE(tmp);
- }
-
- /* the list is empty now...*/
- smb_exit_event_list = NULL;
-
- return;
-}
Modified: trunk/source/smbd/server.c
===================================================================
--- trunk/source/smbd/server.c 2005-07-31 23:49:44 UTC (rev 8871)
+++ trunk/source/smbd/server.c 2005-07-31 23:53:29 UTC (rev 8872)
@@ -617,9 +617,6 @@
print_notify_send_messages(3); /* 3 second timeout. */
- /* run all registered exit events */
- smb_run_exit_events();
-
/* delete our entry in the connections database. */
yield_connection(NULL,"");
More information about the samba-cvs
mailing list