s3-messaging: use messaging_ctdbd_reinit() in messaging_reinit()
authorRalph Boehme <slow@samba.org>
Sat, 9 Jul 2016 12:33:52 +0000 (14:33 +0200)
committerRalph Boehme <slow@samba.org>
Mon, 11 Jul 2016 21:45:20 +0000 (23:45 +0200)
commita391e9202db6a8f64f2fe12d0ab5752f6e684f84
tree1a553cc7c6442caf4e664c81facc395082ef95e9
parentf991381356b09c09edf410b2659bb4f833102be7
s3-messaging: use messaging_ctdbd_reinit() in messaging_reinit()

This is the last step to fix a regression introduced by

  3fe3226daa8488e0fa787c40359c3401b6f05fc0 and
  3fe3226daa8488e0fa787c40359c3401b6f05fc0^

where we pass the ctdb-messaging object conn to db_open() and add a
reference to it to the private db_ctdb_ctx for later use. Unfortunately
reinit_after_fork() destroys conn, leaving us with an invalid reference.

The previous patches added new lower level functions
messaging_ctdbd_reinit() and ctdbd_reinit_connection(), finally use them
them from messaging_reinit(). They preserve the conn object and simply
reinitialize the IPC fd.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jul 11 23:45:20 CEST 2016 on sn-devel-144
source3/lib/messages.c