Skip to content

Commit

Permalink
Fix admin space: plugins __path__ was invalid JSON (#990)
Browse files Browse the repository at this point in the history
  • Loading branch information
JEnoch authored Apr 29, 2024
1 parent feaf07f commit ea604b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/zenoh-plugin-trait/src/manager/dynamic_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl<StartArgs: PluginStartArgs, Instance: PluginInstance> PluginStatus
if let Some(starter) = &self.starter {
starter.path()
} else {
"<not loaded>"
"__not_loaded__"
}
}
fn state(&self) -> PluginState {
Expand Down
2 changes: 1 addition & 1 deletion plugins/zenoh-plugin-trait/src/manager/static_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ where
Some(P::PLUGIN_LONG_VERSION)
}
fn path(&self) -> &str {
r#""<static>""#
"__static_lib__"
}
fn state(&self) -> PluginState {
self.instance
Expand Down
2 changes: 1 addition & 1 deletion zenoh/src/net/runtime/adminspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ fn plugins_status(context: &AdminContext, query: Query) {
if let Err(e) = query
.reply(Ok(Sample::new(
key_expr,
Value::from(plugin.path()).encoding(KnownEncoding::AppJson.into()),
serde_json::Value::String(plugin.path().into()),
)))
.res()
{
Expand Down

0 comments on commit ea604b6

Please sign in to comment.