diff options
author | Roy Marples <roy@marples.name> | 2008-02-23 00:26:11 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-02-23 00:26:11 +0000 |
commit | 8b4b958678c52893ab1901c15dec123c99d56927 (patch) | |
tree | da63da0453b1d392390b09d7d0a3e281b45bf7ad /src/rc | |
parent | 00aa221b9877e3c6d868adf6e7d17dde0763c50a (diff) |
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.
Diffstat (limited to 'src/rc')
-rw-r--r-- | src/rc/rc-applets.c | 10 |
1 files changed, 6 insertions, 4 deletions
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); |