compositor: Avoid loading systemd-notify plug-in 10/26610/1 12.0.1 lamprey/12.0.1 lamprey_12.0.1
authorMarius Vlad <marius.vlad@collabora.com>
Thu, 24 Jun 2021 09:04:47 +0000 (11:04 +0200)
committerMarius Vlad <marius.vlad@collabora.com>
Thu, 2 Sep 2021 13:05:32 +0000 (16:05 +0300)
This helps being compliant with the weston ini configuration file, and
in the same time being able to load other necessary modules. Instead of
creating a separate module for loading the systemd-notify do the same
thing as xwayland and avoid any attempt of loading it if passed over the
command line, or specified in the ini file.

Bug-AGL: SPEC-4001

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I46018f2dff5599bb3acc7c7334e77437995d0588

src/compositor.c

index 4ee4dc3..c8f9e60 100644 (file)
@@ -1177,6 +1177,14 @@ load_modules(struct ivi_compositor *ivi, const char *modules,
                        continue;
                }
 
+               if (strstr(buffer, "systemd-notify.so")) {
+                       weston_log("systemd-notify plug-in already loaded!\n");
+                       p = end;
+                       while (*p == ',')
+                               p++;
+                       continue;
+               }
+
                module_init = weston_load_module(buffer, "wet_module_init");
                if (!module_init)
                        return -1;