We already have a working port thanks to meshlink_open().
fclose(f);
fprintf(fh, "ECDSAPublicKey = %s\n", b64key);
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);
sptps_send_record(&(mesh->sptps), 1, b64key, strlen(b64key));
free(b64key);
ecdsa_free(key);
fprintf(stderr, "Configuration stored in: %s\n", mesh->confbase);
return true;
fprintf(stderr, "Configuration stored in: %s\n", mesh->confbase);
return true;
- if(!mesh->myport || !*port)
port = "655";
if(!b64decode(slash, mesh->hash, 18) || !b64decode(slash + 24, mesh->cookie, 18))
port = "655";
if(!b64decode(slash, mesh->hash, 18) || !b64decode(slash + 24, mesh->cookie, 18))