summaryrefslogtreecommitdiffstats
path: root/src/shell.c
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-10-10 17:03:15 +0300
committerMarius Vlad <marius.vlad@collabora.com>2022-12-05 15:27:26 +0200
commit05bb0384732480a9f24a8d9093ac2da20081e307 (patch)
treec19334fcf20c0f02d51b0b1e7bfac3b8d021687a /src/shell.c
parent14a1292a393774727fb85662d98d8cbe4bc6e5cd (diff)
compositor: Allow to start other clients
This introduces shell-client-ext as a new section entry to add to allow starting the gRPC server helper client. Bug-AGL: SPEC-4503 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I41d62c932648699aa21837afc2de5103912c370d
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/shell.c b/src/shell.c
index ad62a27..ab74f69 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -996,17 +996,16 @@ process_handle_sigchld(struct weston_process *process, int status)
}
int
-ivi_launch_shell_client(struct ivi_compositor *ivi)
+ivi_launch_shell_client(struct ivi_compositor *ivi, const char *cmd_section,
+ struct wl_client **client)
{
struct process_info *pinfo;
struct weston_config_section *section;
char *command = NULL;
- section = weston_config_get_section(ivi->config, "shell-client",
- NULL, NULL);
+ section = weston_config_get_section(ivi->config, cmd_section, NULL, NULL);
if (section)
- weston_config_section_get_string(section, "command",
- &command, NULL);
+ weston_config_section_get_string(section, "command", &command, NULL);
if (!command)
return -1;
@@ -1019,9 +1018,8 @@ ivi_launch_shell_client(struct ivi_compositor *ivi)
if (!pinfo->path)
goto out_free;
- ivi->shell_client.client = client_launch(ivi->compositor, &pinfo->proc,
- command, process_handle_sigchld);
- if (!ivi->shell_client.client)
+ *client = client_launch(ivi->compositor, &pinfo->proc, command, process_handle_sigchld);
+ if (!*client)
goto out_str;
return 0;