/*
* $Id$
*
- * This module will eventually replace netproc and some of its utilities. In
- * the meantime, it serves as a mailing list manager.
+ * This module handles shared rooms, inter-Citadel mail, and outbound
+ * mailing list processing.
*
* Copyright (C) 2000-2001 by Art Cancro and others.
* This code is released under the terms of the GNU General Public License.
*/
/*
- * FIXME do something about concurrency issues:
- * 1. Don't allow the two nodes to poll each other at the same time
- * 2. Don't allow polls during network processing
- * 3. Kill Bill Gates using either a chainsaw or a wood chipper
+ * FIXME
+ * Don't allow polls during network processing
*/
#include "sysdep.h"
#include "internet_addressing.h"
#include "serv_network.h"
#include "clientsocket.h"
+#include "file_ops.h"
/*
int sock;
char buf[SIZ];
+ if (network_talking_to(node, NTT_CHECK)) return;
+ network_talking_to(node, NTT_ADD);
lprintf(5, "Polling node <%s> at %s:%s\n", node, host, port);
sock = sock_connect(host, port, "tcp");
if (sock < 0) {
lprintf(7, "Could not connect: %s\n", strerror(errno));
+ network_talking_to(node, NTT_REMOVE);
return;
}
sock_puts(sock, "QUIT");
bail: sock_close(sock);
+ network_talking_to(node, NTT_REMOVE);
}
return;
}
+ if (network_talking_to(node, NTT_CHECK)) {
+ cprintf("%d Already talking to %s right now\n", ERROR);
+ return;
+ }
+
safestrncpy(CC->net_node, node, sizeof CC->net_node);
+ network_talking_to(node, NTT_ADD);
cprintf("%d authenticated as network node '%s'\n", OK,
CC->net_node);
}