From 8b4b958678c52893ab1901c15dec123c99d56927 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 23 Feb 2008 00:26:11 +0000 Subject: Now that s-s-d accepts >1 argument for stopping a daemon on match we need to store all arguments used incase a service started the same daemon more than once with different paramters. --- src/rc/rc-applets.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/rc') diff --git a/src/rc/rc-applets.c b/src/rc/rc-applets.c index 12519982..5f242f70 100644 --- a/src/rc/rc-applets.c +++ b/src/rc/rc-applets.c @@ -225,20 +225,22 @@ static int do_service (int argc, char **argv) ok = (rc_service_state (service) & RC_SERVICE_WASINACTIVE); else if (strcmp (applet, "service_started_daemon") == 0) { int idx = 0; - char *d = argv[1]; + char *d[] = { argv[1], NULL }; service = getenv ("SVCNAME"); if (argc > 3) { service = argv[1]; - d = argv[2]; + d[0] = argv[2]; sscanf (argv[3], "%d", &idx); } else if (argc == 3) { if (sscanf (argv[2], "%d", &idx) != 1) { service = argv[1]; - d = argv[2]; + *d = argv[2]; } } - exit (rc_service_started_daemon (service, d, idx) ? 0 : 1); + ok = rc_service_started_daemon (service, + (const char * const *)d, idx); + } else eerrorx ("%s: unknown applet", applet); -- cgit v1.2.3