start command might have included plugin-specific parameters */
| 1364 | |
| 1365 | /* start command might have included plugin-specific parameters */ |
| 1366 | static const char *plugin_add_params(struct plugin *plugin) |
| 1367 | { |
| 1368 | size_t i; |
| 1369 | const jsmntok_t *t; |
| 1370 | |
| 1371 | if (!plugin->params) |
| 1372 | return NULL; |
| 1373 | |
| 1374 | json_for_each_obj(i, t, plugin->params) { |
| 1375 | struct plugin_opt *popt; |
| 1376 | char *err; |
| 1377 | |
| 1378 | popt = plugin_opt_find(plugin, |
| 1379 | plugin->parambuf + t->start, |
| 1380 | t->end - t->start); |
| 1381 | if (!popt) { |
| 1382 | return tal_fmt(plugin, "unknown parameter %.*s", |
| 1383 | json_tok_full_len(t), |
| 1384 | json_tok_full(plugin->parambuf, t)); |
| 1385 | } |
| 1386 | err = plugin_opt_set(json_strdup(tmpctx, plugin->parambuf, |
| 1387 | t + 1), popt); |
| 1388 | if (err) |
| 1389 | return err; |
| 1390 | } |
| 1391 | return NULL; |
| 1392 | } |
| 1393 | |
| 1394 | static void plugin_manifest_timeout(struct plugin *plugin) |
| 1395 | { |
no test coverage detected