diff options
author | Roy Marples <roy@marples.name> | 2008-03-17 14:42:10 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-03-17 14:42:10 +0000 |
commit | 5d77c0db6b8641b39a27b0824fc3a7e075d38ff5 (patch) | |
tree | fbbc589a8b3c6d6d26b0bbaef01a98e1d328878f /src/librc | |
parent | b2f7606b2366bd4c7196f3ce786375353e942e80 (diff) |
This should be a fixed buffer.
Diffstat (limited to 'src/librc')
-rw-r--r-- | src/librc/librc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/librc/librc.c b/src/librc/librc.c index d3a4685b..df6ab9c0 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -478,7 +478,7 @@ bool rc_service_mark(const char *service, const RC_SERVICE state) char *init = rc_service_resolve(service); bool skip_wasinactive = false; int s; - char *was; + char was[PATH_MAX]; RC_STRINGLIST *dirs; RC_STRING *dir; int serrno; @@ -495,7 +495,7 @@ bool rc_service_mark(const char *service, const RC_SERVICE state) } snprintf(file, sizeof(file), RC_SVCDIR "/%s/%s", - rc_parse_service_state (state), base); + rc_parse_service_state(state), base); if (exists(file)) unlink(file); i = symlink(init, file); @@ -503,10 +503,9 @@ bool rc_service_mark(const char *service, const RC_SERVICE state) free(init); return false; } - skip_state = state; } - + if (state == RC_SERVICE_COLDPLUGGED || state == RC_SERVICE_FAILED) { free(init); return true; @@ -523,7 +522,7 @@ bool rc_service_mark(const char *service, const RC_SERVICE state) (! skip_wasinactive || s != RC_SERVICE_WASINACTIVE)) { snprintf(file, sizeof(file), RC_SVCDIR "/%s/%s", - rc_parse_service_state(s), base); + rc_service_state_names[i].name, base); if (exists(file)) { if ((state == RC_SERVICE_STARTING || state == RC_SERVICE_STOPPING) && |