]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/network.c
python: Raise IndexError when adding the same network twice
[people/ms/libloc.git] / src / network.c
index 4f297147f82e6d2e2bddcc65cab3507e667891f8..3d386126f103bd3c8716ea3f98ad353588cd4a80 100644 (file)
@@ -511,7 +511,7 @@ LOC_EXPORT int loc_network_tree_add_network(struct loc_network_tree* tree, struc
        // Check if node has not been set before
        if (node->network) {
                DEBUG(tree->ctx, "There is already a network at this path\n");
-               return 1;
+               return -EBUSY;
        }
 
        // Point node to the network