commit 541496e9f0264ade1cce2c0aae6730aaa43afc74
parent 390f5a57bf7358cdd8dff16552d7b52ec2d48323
Author: Jacki <jacki@thejackimonster.de>
Date: Sat, 9 Mar 2024 01:10:38 +0100
Print error messages
Signed-off-by: Jacki <jacki@thejackimonster.de>
Diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/application.c b/src/application.c
@@ -302,9 +302,13 @@ application_init(MESSENGER_Application *app,
),
0
);
+ else
+ g_printerr("ERROR: PW-Loop not created!\n");
if (app->pw.context)
pw_context_load_module(app->pw.context, "libpipewire-module-link-factory", NULL, NULL);
+ else
+ g_printerr("ERROR: PW-Context not created!\n");
app->pw.core = app->pw.context? pw_context_connect(app->pw.context, NULL, 0) : NULL;
app->pw.registry = app->pw.core?
@@ -319,6 +323,8 @@ application_init(MESSENGER_Application *app,
&remote_core_events,
app
);
+ else
+ g_printerr("ERROR: PW-Core not created!\n");
if (app->pw.registry)
pw_registry_add_listener(
@@ -327,10 +333,12 @@ application_init(MESSENGER_Application *app,
®istry_events,
app
);
+ else
+ g_printerr("ERROR: PW-Registry not created!\n");
app->pw.pending = app->pw.core? pw_core_sync(app->pw.core, 0, 0) : 0;
- if (app->pw.main_loop)
+ if ((app->pw.main_loop) && (app->pw.core))
pw_main_loop_run(app->pw.main_loop);
g_application_add_main_option(