Since the plugin is not linked, but dlopen()'d with RTLD_LOCAL, we cannot
access global rpcd variables but need to access them via the common ops
structure symbol.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
us.stream.notify_state = rpc_file_##name##_state_cb; \
ustream_fd_init(&us, fd);
us.stream.notify_state = rpc_file_##name##_state_cb; \
ustream_fd_init(&us, fd);
+static const struct rpc_daemon_ops *ops;
+
struct rpc_file_exec_context {
struct ubus_context *context;
struct ubus_request_data request;
struct rpc_file_exec_context {
struct ubus_context *context;
struct ubus_request_data request;
uloop_process_add(&c->process);
c->timeout.cb = rpc_file_exec_timeout_cb;
uloop_process_add(&c->process);
c->timeout.cb = rpc_file_exec_timeout_cb;
- uloop_timeout_set(&c->timeout, rpc_exec_timeout);
+ uloop_timeout_set(&c->timeout, *ops->exec_timeout);
close(opipe[1]);
close(epipe[1]);
close(opipe[1]);
close(epipe[1]);
.n_methods = ARRAY_SIZE(file_methods),
};
.n_methods = ARRAY_SIZE(file_methods),
};
return ubus_add_object(ctx, &obj);
}
return ubus_add_object(ctx, &obj);
}