]> git.meshlink.io Git - meshlink/blobdiff - meshlink-sample/meshlinkapp.c
Remove everything GPL that is not copyright Guus Sliepen, update copyright statements.
[meshlink] / meshlink-sample / meshlinkapp.c
index 515a2d52d86a05d1516ad3676d13a56d9830c7de..0b494599f4c6c635d4ad0503909b2cbdbd614d6b 100644 (file)
@@ -4,16 +4,18 @@ int main(int argc , char **argv){
 
 char *confbase = "/tmp/meshlink/";
 char *name = "test";
+debug_level = 5;
 
-tincremotehost* remotenode = malloc(sizeof(tincremotehost));
-char *remotename = "nameofremotenode";
+node_t* remotenode = new_node();
+char *remotename = "ml";
 
-//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