Skip to content

Commit

Permalink
fixup! plugin: Handle log notifications from plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker committed Dec 10, 2018
1 parent e35e538 commit 0b96382
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lightningd/plugin.c
Expand Up @@ -241,9 +241,9 @@ static void plugin_log_handle(struct plugin *plugin, const jsmntok_t *paramstok)
msgtok = json_get_member(plugin->buffer, paramstok, "message");
leveltok = json_get_member(plugin->buffer, paramstok, "level");

if (!msgtok) {
if (!msgtok || msgtok->type != JSMN_STRING) {
plugin_kill(plugin, "Log notification from plugin doesn't have "
"a \"message\" field");
"a string \"message\" field");
return;
}

Expand Down

0 comments on commit 0b96382

Please sign in to comment.