X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Finvitation.c;h=f75bf40928f91af97b3241c12862756eba9fab73;hb=158cbe99f972a1613b7d4d95abfe5fe48e019e67;hp=cdef3d0480efa04278ecb834156ef9332de99ec0;hpb=06a4a8c153407b690a3ce3f0e7fdaa8568ccb1a3;p=meshlink diff --git a/src/invitation.c b/src/invitation.c index cdef3d04..f75bf409 100644 --- a/src/invitation.c +++ b/src/invitation.c @@ -1,6 +1,6 @@ /* invitation.c -- Create and accept invitations - Copyright (C) 2013-2014 Guus Sliepen + Copyright (C) 2014 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,10 +24,8 @@ #include "ecdsa.h" #include "ecdsagen.h" #include "invitation.h" -#include "names.h" #include "netutl.h" #include "rsagen.h" -#include "script.h" #include "sptps.h" #include "tincctl.h" #include "utils.h" @@ -434,22 +432,6 @@ int cmd_invite(int argc, char *argv[]) { char *url; xasprintf(&url, "%s/%s%s", address, hash, cookie); - // Call the inviation-created script - char *envp[6] = {}; - xasprintf(&envp[0], "NAME=%s", myname); - xasprintf(&envp[1], "NETNAME=%s", netname); - xasprintf(&envp[2], "NODE=%s", argv[1]); - xasprintf(&envp[3], "INVITATION_FILE=%s", filename); - xasprintf(&envp[4], "INVITATION_URL=%s", url); - execute_script("invitation-created", envp); - for(int i = 0; i < 6 && envp[i]; i++) - free(envp[i]); - - puts(url); - free(url); - free(filename); - free(address); - return 0; } @@ -563,13 +545,6 @@ static bool finalize_join(void) { char temp_netname[32]; make_names: - if(!confbasegiven) { - free(confbase); - confbase = NULL; - } - - make_names(); - free(tinc_conf); free(hosts_dir); @@ -775,7 +750,6 @@ ask_netname: free(newbase); netname = line; - make_names(); } fprintf(stderr, "Configuration stored in: %s\n", confbase); @@ -836,11 +810,6 @@ int cmd_join(int argc, char *argv[]) { } // Make sure confbase exists and is accessible. - if(!confbase_given && mkdir(confdir, 0755) && errno != EEXIST) { - fprintf(stderr, "Could not create directory %s: %s\n", confdir, strerror(errno)); - return 1; - } - if(mkdir(confbase, 0777) && errno != EEXIST) { fprintf(stderr, "Could not create directory %s: %s\n", confbase, strerror(errno)); return 1;