#include "xalloc.h"
#include "ed25519/sha512.h"
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif
//TODO: this can go away completely
const var_t variables[] = {
if(!read_server_config(mesh))
return meshlink_close(mesh), NULL;
+#ifdef HAVE_MINGW
+ struct WSAData wsa_state;
+ WSAStartup(MAKEWORD(2, 2), &wsa_state);
+#endif
+
// Setup up everything
// TODO: we should not open listening sockets yet
exit_configuration(&mesh->config);
event_loop_exit(&mesh->loop);
+
+#ifdef HAVE_MINGW
+ WSACleanup();
+#endif
}
void meshlink_set_receive_cb(meshlink_handle_t *mesh, meshlink_receive_cb_t cb) {
node_t *n;
n = (node_t*)node;
n->status.blacklisted=true;
+ fprintf(stderr, "Blacklisted %s.\n",node->name);
+
+ //Make blacklisting persistent in the config file
+ append_config_file(mesh, n->name, "blacklisted", "yes");
return;
}