]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink.c
Don't allow meshlink_join() when the storage policy is DISABLED.
[meshlink] / src / meshlink.c
index da7305515bec02fb4687b91afa0d08b02819dd96..8b9e195fa7df2b9a96d4c949d721867d10271783 100644 (file)
@@ -3025,6 +3025,11 @@ bool meshlink_join(meshlink_handle_t *mesh, const char *invitation) {
                return false;
        }
 
+       if(mesh->storage_policy == MESHLINK_STORAGE_DISABLED) {
+               meshlink_errno = MESHLINK_EINVAL;
+               return false;
+       }
+
        join_state_t state = {
                .mesh = mesh,
                .sock = -1,