From 0b07d0ad19634f8c28c852d64d1b22bab49924c4 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 12 May 2014 00:05:47 +0200 Subject: [PATCH] Don't change the port in finalize_join(). We already have a working port thanks to meshlink_open(). --- src/meshlink.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/meshlink.c b/src/meshlink.c index ce69e86d..56a1ae7a 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -558,14 +558,15 @@ static bool finalize_join(meshlink_handle_t *mesh) { fclose(f); fprintf(fh, "ECDSAPublicKey = %s\n", b64key); + fprintf(fh, "Port = %s\n", mesh->myport); + + fclose(fh); sptps_send_record(&(mesh->sptps), 1, b64key, strlen(b64key)); free(b64key); ecdsa_free(key); - check_port(mesh); - fprintf(stderr, "Configuration stored in: %s\n", mesh->confbase); return true; @@ -1141,7 +1142,7 @@ bool meshlink_join(meshlink_handle_t *mesh, const char *invitation) { *port++ = 0; } - if(!mesh->myport || !*port) + if(!*port) port = "655"; if(!b64decode(slash, mesh->hash, 18) || !b64decode(slash + 24, mesh->cookie, 18)) -- 2.39.5