]> git.meshlink.io Git - meshlink/blobdiff - src/libmeshlink.c
tinc_start() - skeleton of the API call. The function starts the main tinc thread...
[meshlink] / src / libmeshlink.c
index b4daff3d0a867b17cf670dbb23abbcd04db12c3e..5cf366c539945df2829247b31ecc2d92c8647419 100644 (file)
@@ -388,7 +388,20 @@ bool tinc_setup(const char* confbaseapi, const char* name) {
 }
 
 
-bool tinc_start(const char* path);
+bool tinc_start(const char* confbaseapi) {
+       pthread_t tincThread;
+       confbase = confbaseapi;
+       pthread_create(&tincThread,NULL,tinc_main_thread,confbaseapi);
+       pthread_detach(tincThread);
+return true;
+}
+
+bool tinc_main_thread(void * in) {
+
+confbase = (char*) in;
+printf("Hello World %s\n",confbase);
+
+}
 
 bool tinc_stop();