#include <sys/file.h>
#include <zephyr/zephyr.h>
#include <sms.h>
+#include <sms_app.h>
#include "dcm.h"
}
-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) {