plugin: Some cleanups that didn't make it into part 2 of the plugin saga - #2131
Conversation
rustyrussell
left a comment
There was a problem hiding this comment.
Minor cleanups only; looks v nice!
|
See previous comment:
If we don't clean this up now, we'll never do it, since everyone will wonder if there's some subtle reason they can be NULL. I'm assuming, of course, that there isn't! |
|
Needed this, so I fixed the other two and rebased... |
74a30f8 to
31c922d
Compare
|
Fixups squashed, will merge as soon as CI passes. |
They pass the executable test, but aren't really executable. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Signed-off-by: Christian Decker <@cdecker>
Suggested-by: Rusty Russell <@rustyrussell> Signed-off-by: Christian Decker <decker.christian@gmail.com>
If the plugin fails to respond to we may end up hanging indefinitely, so we limit the time we're willing to wait to 10 seconds. Signed-off-by: Christian Decker <decker.christian@gmail.com>
We can use the internal buffering of the json_stream instead of manually building JSON-RPC calls. This makes it a lot easier to handle these requests. Notice that we do not flush concurrently and still buffer all the things, but it avoids double-buffering things. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Suggested-by: Rusty Russell <@rustyrussell> Signed-off-by: Christian Decker <decker.christian@gmail.com>
This used to be a use-after-free bug in which we'd free the plugin and then still have two connections that expect to be able to operate on the plugin. This now signals the connections to exit and cleans up once they do. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Both of these plugins will fail in interesting ways, and we should still handle them correctly. Signed-off-by: Christian Decker <decker.christian@gmail.com>
|
The rebase on top of Hence I added commit 85c520c which ignores subdirectories and moved the failing plugins into a subdirectory.
|
|
|
||
| /* Ignore directories, they have exec mode, but aren't executable. */ | ||
| if (st.st_mode & S_IFDIR) | ||
| return tal_free(fullname); |
There was a problem hiding this comment.
Reversing these tests makes more sense, but it's a trivial cleanup, so I'll apply this and do a separate PR.
tal_arr_removegetmanifestcall