MCPcopy Create free account
hub / github.com/ElementsProject/lightning / plugin_paths_match

Function plugin_paths_match

lightningd/plugin.c:390–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390bool plugin_paths_match(const char *cmd, const char *name)
391{
392 if (strchr(name, PATH_SEP)) {
393 const char *cmd_canon, *name_canon;
394
395 if (streq(cmd, name))
396 return true;
397
398 /* These return NULL path doesn't exist */
399 cmd_canon = path_canon(tmpctx, cmd);
400 name_canon = path_canon(tmpctx, name);
401 return cmd_canon && name_canon && streq(name_canon, cmd_canon);
402 } else {
403 /* No path separator means a basename match. */
404 const char *base = path_basename(tmpctx, cmd);
405
406 return streq(base, name);
407 }
408}
409
410void plugin_blacklist(struct plugins *plugins, const char *name)
411{

Callers 5

plugin_blacklistFunction · 0.85
plugin_blacklistedFunction · 0.85
plugins_initFunction · 0.85
plugin_dynamic_stopFunction · 0.85
find_hookFunction · 0.85

Calls 2

path_canonFunction · 0.85
path_basenameFunction · 0.85

Tested by

no test coverage detected