cmd_TERM: also kill AsyncIO contexts
authorWilfried Goesgens <dothebart@citadel.org>
Mon, 23 Jul 2012 14:26:35 +0000 (16:26 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 23 Jul 2012 14:26:35 +0000 (16:26 +0200)
commit194ee6709f01560434de4450b70d1f667731966d
treef271cc55be6b5630d5c0c318f056af45cfd077cf
parentfb3d7e4ae75c12e5a87e2731ec0d413152e64ead
cmd_TERM: also kill AsyncIO contexts

  - the next_pid var has to be global, so we have a uniq source of session numbers.
  - during cloning sessions, cached_msglist and CIT_ICAL mustn't be copied.
  - FreeAsyncIOContents(): NULL pointer to context after flagging it for deletion.
  - InitIOStruct() / InitcURLIOStruct(): IO and CC are now doublepointered, know each others.
  - KillAsyncIOContext () detect in which event-queue the context is running
  - Join that queue, and call the terminator hook of the other session.
  - self-terminate afterwards.
citadel/context.c
citadel/context.h
citadel/event_client.c
citadel/event_client.h