]> git.meshlink.io Git - meshlink/commitdiff
Merge branch 'mesh_topology_output' into roles
authorNiklas Hofmann <niklas.hofmann@everbase.net>
Wed, 13 Aug 2014 11:30:16 +0000 (13:30 +0200)
committerNiklas Hofmann <niklas.hofmann@everbase.net>
Wed, 13 Aug 2014 11:30:16 +0000 (13:30 +0200)
1  2 
src/meshlink.c
src/meshlink.h
src/meshlink_internal.h
src/net.c

diff --cc src/meshlink.c
index bf1eb92bcdf0719ac99eb1780b4e5bbc4d173854,e84aafcac9e3a7d3197e278eb186c510b0c5a232..1d52724e26d6e31b52255bbb2ae8976e4edbb770
@@@ -785,9 -781,15 +787,15 @@@ meshlink_handle_t *meshlink_open_with_s
        meshlink_handle_t *mesh = xzalloc(size);
        mesh->confbase = xstrdup(confbase);
        mesh->appname = xstrdup(appname);
 -      mesh->dclass = dclass;
 +      mesh->devclass = devclass;
        if (usingname) mesh->name = xstrdup(name);
-       pthread_mutex_init ( &(mesh->nodes_mutex), NULL);
+       // initialize mutex
+       pthread_mutexattr_t attr;
+       pthread_mutexattr_init(&attr);
+       pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+       pthread_mutex_init(&(mesh->mesh_mutex), &attr);
+       
        mesh->threadstarted = false;
        event_loop_init(&mesh->loop);
        mesh->loop.data = mesh;
diff --cc src/meshlink.h
Simple merge
Simple merge
diff --cc src/net.c
Simple merge