- char hostbuf[SIZ], portbuf[SIZ];
- char buf[SIZ];
- char *args[] =
- {"sendcommand", NULL};
- int r;
-
- strcpy(hostbuf, "localhost");
- strcpy(portbuf, "citadel");
- fprintf(stderr, "Attaching to server...\n");
- ipc = CtdlIPC_new(1, args, hostbuf, portbuf);
- CtdlIPC_getline(ipc, buf);
- fprintf(stderr, "%s\n", &buf[4]);
- snprintf(buf, sizeof buf, "IPGM %d", config.c_ipgm_secret);
- r = CtdlIPCInternalProgram(ipc, config.c_ipgm_secret, buf);
- fprintf(stderr, "%s\n", buf);
- if (r / 100 != 2) {
- cleanup(2);
- }