svn commit: samba r8872 - in trunk/source: include lib smbd
Stefan (metze) Metzmacher
metze at samba.org
Mon Aug 1 00:04:03 GMT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
vlendec at samba.org schrieb:
> 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,"");
>
>
Hi Volker,
when you also want to remove it from samba3, then please fix the DevelopersGuide,
I think I have added some notes there
- --
metze
Stefan Metzmacher <metze at samba.org> www.samba.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFC7Wbxm70gjA5TCD8RAhCVAJ4z/Q4dn9GzTv6g1CFR2zIVeFdxwQCgxuAg
0V0KMZgfZLAiH+E9h2kX9rY=
=kV3h
-----END PGP SIGNATURE-----
More information about the samba-cvs
mailing list