X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink.c;h=52a4389a9311e1e872091e9cccc335db94ca3b37;hb=34a52e6e69be085ee99755c2890268d2ce11f9b4;hp=f6121a1ea67f589335f271a7b3edd39568ca8435;hpb=5c7be85686db219955e1af592b32d0d4108625cb;p=meshlink diff --git a/src/meshlink.c b/src/meshlink.c index f6121a1e..52a4389a 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -1033,6 +1033,7 @@ meshlink_handle_t *meshlink_open(const char *confbase, const char *name, const c mesh->appname = xstrdup(appname); mesh->devclass = devclass; mesh->discovery = true; + mesh->invitation_timeout = 604800; // 1 week if(usingname) { mesh->name = xstrdup(name); @@ -1744,7 +1745,7 @@ bool meshlink_set_canonical_address(meshlink_handle_t *mesh, meshlink_node_t *no } bool meshlink_add_address(meshlink_handle_t *mesh, const char *address) { - return meshlink_set_canonical_address(mesh, mesh->self, address, NULL); + return meshlink_set_canonical_address(mesh, (meshlink_node_t *)mesh->self, address, NULL); } bool meshlink_add_external_address(meshlink_handle_t *mesh) { @@ -1832,6 +1833,10 @@ done: return rval; } +void meshlink_set_invitation_timeout(meshlink_handle_t *mesh, int timeout) { + mesh->invitation_timeout = timeout; +} + char *meshlink_invite(meshlink_handle_t *mesh, const char *name) { if(!mesh) { meshlink_errno = MESHLINK_EINVAL;