X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fmeshlink.c;h=52a4389a9311e1e872091e9cccc335db94ca3b37;hp=1c81ad22673957362d0b11de8ef9bbd0c3eb38c8;hb=34a52e6e69be085ee99755c2890268d2ce11f9b4;hpb=fe4cf1f57aa26458d1c2a9c44a06f9e49fe8d615 diff --git a/src/meshlink.c b/src/meshlink.c index 1c81ad22..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); @@ -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;