mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 06:59:21 +00:00
lib: Rename frrscript_unload to delete
frrscript_load now loads a function instead of a file, so frrscript_unload should be renamed since it does not unload a function. Signed-off-by: Donald Lee <dlqs@gmx.com>
This commit is contained in:
parent
8a04c1e74e
commit
64d457d7ac
@ -434,7 +434,7 @@ route_match_script(void *rule, const struct prefix *prefix, void *object)
|
||||
break;
|
||||
}
|
||||
|
||||
frrscript_unload(fs);
|
||||
frrscript_delete(fs);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@ -2443,7 +2443,7 @@ DEFUN(script,
|
||||
vty_out(vty, "p: %s\n", buf);
|
||||
vty_out(vty, "Script result: %d\n", ret);
|
||||
|
||||
frrscript_unload(fs);
|
||||
frrscript_delete(fs);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
@ -319,7 +319,7 @@ fail:
|
||||
return 1;
|
||||
}
|
||||
|
||||
void frrscript_unload(struct frrscript *fs)
|
||||
void frrscript_delete(struct frrscript *fs)
|
||||
{
|
||||
hash_iterate(fs->lua_function_hash, lua_function_free, NULL);
|
||||
XFREE(MTYPE_SCRIPT, fs->name);
|
||||
|
@ -89,7 +89,7 @@ int frrscript_load(struct frrscript *fs, const char *function_name,
|
||||
/*
|
||||
* Destroy FRR script.
|
||||
*/
|
||||
void frrscript_unload(struct frrscript *fs);
|
||||
void frrscript_delete(struct frrscript *fs);
|
||||
|
||||
/*
|
||||
* Register a Lua codec for a type.
|
||||
|
@ -98,7 +98,7 @@ int main(int argc, char **argv)
|
||||
result = frrscript_call(fs, "bad_return4");
|
||||
assert(result == 1);
|
||||
|
||||
frrscript_unload(fs);
|
||||
frrscript_delete(fs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user