X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=meshlink-sample%2Fmeshlinkapp.c;h=647e6b77630c66b05b2d14e664ae3d1a4899ebbf;hb=refs%2Fheads%2Fdirtydebug;hp=515a2d52d86a05d1516ad3676d13a56d9830c7de;hpb=e271de392bf0e11c9903f3918dcc3d6b7e53b99f;p=meshlink diff --git a/meshlink-sample/meshlinkapp.c b/meshlink-sample/meshlinkapp.c index 515a2d52..647e6b77 100644 --- a/meshlink-sample/meshlinkapp.c +++ b/meshlink-sample/meshlinkapp.c @@ -5,15 +5,16 @@ int main(int argc , char **argv){ char *confbase = "/tmp/meshlink/"; char *name = "test"; -tincremotehost* remotenode = malloc(sizeof(tincremotehost)); +node_t* remotenode = new_node(); char *remotename = "nameofremotenode"; -//TODO: change this, calling a function that returns tincremotehost +//TODO: change this, calling a function that returns node_t +remotenode->name = malloc(16); remotenode->name = remotename; -remotenode->publickey = NULL; tinc_setup(confbase, name); tinc_start(confbase); +sleep(2); //there is a race condition here, tinc_start detaches to a thread the needs time to setup stuff while(1) { //sample data to send out