From: Niklas Hofmann Date: Wed, 30 Jul 2014 22:40:28 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/everbase' into discovery X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=efbdf1564bb6a8f17ca28e61ccc6a507f1159994;p=meshlink Merge remote-tracking branch 'origin/everbase' into discovery --- efbdf1564bb6a8f17ca28e61ccc6a507f1159994 diff --cc src/meshlink.c index d33c0d17,9fc80153..f9e7e905 --- a/src/meshlink.c +++ b/src/meshlink.c @@@ -832,12 -862,11 +867,14 @@@ bool meshlink_start(meshlink_handle_t * } void meshlink_stop(meshlink_handle_t *mesh) { - if(!mesh) + if(!mesh) { + meshlink_errno = MESHLINK_EINVAL; return; + } + // Stop discovery + discovery_stop(mesh); + // Shut down the listening sockets to signal the main thread to shut down for(int i = 0; i < mesh->listen_sockets; i++) {