Rework networker
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 10 Jun 2012 10:38:30 +0000 (12:38 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 10 Jun 2012 10:38:30 +0000 (12:38 +0200)
commitb35ed2c5958f57f2113dec3adc66274419af3066
treef70875af5ff9001473c633558fb09ecb1f36fc73
parent31c5406616d5990e183627edbb7e6c324da0bf03
Rework networker

  - keep netconfigs in hash; create the usual deserialize/delete/... functions
  - keep the netmap in hash; create the usual de/serialize/delete/... functions
  - change sequence: serialize & save netmap; combine spoolfiles; free netmap.
  - use strbufs splice() wrappers to combine the message-spoolfiles into host-spoolfiles instead of forking a shell & running cat + rm
  - when appending to host-spoolfile fails, remove partial adds to avoid creating invalid spool control files
  - only cleanup spool directory if we successfully combined all files; else we might loose messages if i.e. a networker is running for that node.
citadel/modules/network/netconfig.h
citadel/modules/network/netspool.h
citadel/modules/network/serv_netconfig.c
citadel/modules/network/serv_netmail.c
citadel/modules/network/serv_netspool.c
citadel/modules/network/serv_network.c