From: Saverio Proto Date: Tue, 17 Jun 2014 17:19:21 +0000 (+0200) Subject: Check for key later because maybe we have to generate it X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=1815910fc7409ffea2b386196c4d12af12578f42;p=meshlink Check for key later because maybe we have to generate it --- diff --git a/src/meshlink.c b/src/meshlink.c index e6ea203f..af248044 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -740,8 +740,6 @@ meshlink_handle_t *meshlink_open(const char *confbase, const char *name) { if (usingname) mesh->name = xstrdup(name); mesh->self = new_node(); mesh->self->connection = new_connection(); - if(!read_ecdsa_private_key(mesh)) - return false; init_nodes(mesh); pthread_mutex_init ( &(mesh->outpacketqueue_mutex), NULL); pthread_mutex_init ( &(mesh->nodes_mutex), NULL); @@ -779,6 +777,8 @@ meshlink_handle_t *meshlink_open(const char *confbase, const char *name) { WSAStartup(MAKEWORD(2, 2), &wsa_state); #endif + if(!read_ecdsa_private_key(mesh)) + return false; return mesh; }