]> andersk Git - moira.git/blobdiff - dcm/utils.c
moved directory definitions
[moira.git] / dcm / utils.c
index b9ab5dd0ab71cda5818cb9376769e5ecbb5f7da3..d8734901ac24b726466a7c5b38d32e870e986587 100644 (file)
@@ -24,6 +24,7 @@ static char *rcsid_utils_c = "$Header$";
 #include <sys/file.h>
 #include <zephyr/zephyr.h>
 #include <sms.h>
+#include <sms_app.h>
 #include "dcm.h"
 
 
@@ -90,14 +91,14 @@ char *tkt_string()
 }
 
 
-int maybe_lock_update(dir, host, service, exclusive)
-char *dir, *host, *service;
+int maybe_lock_update(host, service, exclusive)
+char *host, *service;
 int exclusive;
 {
     char lock[BUFSIZ];
     int fd;
 
-    sprintf(lock, "%s/dcm/locks/%s.%s", dir, host, service);
+    sprintf(lock, "%s/%s.%s", LOCK_DIR, host, service);
     if ((fd = open(lock, O_TRUNC |  O_CREAT, 0)) < 0)
       com_err(whoami, errno, ": maybe_lock_update: opening %s", lock);
     else if (flock(fd, (exclusive ? LOCK_EX : LOCK_SH) | LOCK_NB) != 0) {
This page took 0.132362 seconds and 4 git commands to generate.