ClusterLabs/libqb — pull request #123 by AnchorCat (2014-06-10 06:47:11+00:00)
Title: ipcs: avoid potential hang on new connections

If an IPC client connects to the server but does not provide an
AUTHENTICATE message, the IPC server will hang.

To fix this, add the newly accepted connection to the mainloop
immediately. Once the AUTHENTICATE message is received, finish the
connection setup as normal.

Note that this change requires IPC servers to implement dispatch_mod
correctly, which until now had not been necessary. examples/ipcserver.c
implemented dispatch_mod for the QB mainloop only; this commit includes
the changes demonstrating how to support dispatch_mod with the GLib
mainloop.