X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fnetwork%2Fnetspool.h;fp=citadel%2Fmodules%2Fnetwork%2Fnetspool.h;h=e52829bce1e3b4fd639f412c81585668b9e7a2ae;hb=b35ed2c5958f57f2113dec3adc66274419af3066;hp=0c0364ce34c8c8fae9bbec34d045b054088f1d0e;hpb=31c5406616d5990e183627edbb7e6c324da0bf03;p=citadel.git diff --git a/citadel/modules/network/netspool.h b/citadel/modules/network/netspool.h index 0c0364ce3..e52829bce 100644 --- a/citadel/modules/network/netspool.h +++ b/citadel/modules/network/netspool.h @@ -1,3 +1,32 @@ +/* + * This module handles shared rooms, inter-Citadel mail, and outbound + * mailing list processing. + * + * Copyright (c) 2000-2012 by the citadel.org team + * + * This program is open source software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * ** NOTE ** A word on the S_NETCONFIGS semaphore: + * This is a fairly high-level type of critical section. It ensures that no + * two threads work on the netconfigs files at the same time. Since we do + * so many things inside these, here are the rules: + * 1. begin_critical_section(S_NETCONFIGS) *before* begin_ any others. + * 2. Do *not* perform any I/O with the client during these sections. + * + */ + typedef struct maplist maplist; struct maplist { @@ -19,16 +48,16 @@ struct SpoolControl { FILE *digestfp; int num_msgs_spooled; - char *working_ignetcfg; - NetMap *the_netmap; + HashList *working_ignetcfg; + HashList *the_netmap; }; void network_spoolout_room(RoomProcList *room_to_spool, - char *working_ignetcfg, - NetMap *the_netmap); -void network_do_spoolin(char *working_ignetcfg, NetMap **the_netmap, int *netmap_changed); -void network_consolidate_spoolout(char *working_ignetcfg, NetMap *the_netmap); + HashList *working_ignetcfg, + HashList *the_netmap); +void network_do_spoolin(HashList *working_ignetcfg, HashList *the_netmap, int *netmap_changed); +void network_consolidate_spoolout(HashList *working_ignetcfg, HashList *the_netmap); void free_spoolcontrol_struct(SpoolControl **scc); int writenfree_spoolcontrol_file(SpoolControl **scc, char *filename); int read_spoolcontrol_file(SpoolControl **scc, char *filename);