*/
#include "includes.h"
-#include "lib/events/events.h"
+#include "lib/tevent/tevent.h"
#include "lib/tdb/include/tdb.h"
#include "system/time.h"
#include "../include/ctdb_private.h"
-#include "../include/ctdb.h"
+#include "../include/ctdb_client.h"
int log_ringbuf_size;
DEBUG(DEBUG_ERR,("Marshalling log entries into a blob of %d bytes\n", (int)data.dsize));
DEBUG(DEBUG_ERR,("Send log to %d:%d\n", (int)log_addr->pnn, (int)log_addr->srvid));
- ctdb_send_message(ctdb, log_addr->pnn, log_addr->srvid, data);
+ ctdb_client_send_message(ctdb, log_addr->pnn, log_addr->srvid, data);
talloc_free(data.dptr);
}
/* spawn a child process to marshall the huge log blob and send it back
to the ctdb tool using a MESSAGE
*/
- child = fork();
+ child = ctdb_fork(ctdb);
if (child == (pid_t)-1) {
DEBUG(DEBUG_ERR,("Failed to fork a log collector child\n"));
return -1;
}
if (child == 0) {
- if (switch_from_server_to_client(ctdb) != 0) {
+ if (switch_from_server_to_client(ctdb, "log-collector") != 0) {
DEBUG(DEBUG_CRIT, (__location__ "ERROR: failed to switch log collector child into client mode.\n"));
_exit(1);
}