* retry - should retry if unable to lock?
*/
-static int invoke_dotlock (const char *path, int dummy, int flags, int retry)
+static int invoke_dotlock (const char *path, int flags, int retry)
{
char cmd[LONG_STRING + _POSIX_PATH_MAX];
char f[SHORT_STRING + _POSIX_PATH_MAX];
return mutt_system (cmd);
}
-static int dotlock_file (const char *path, int fd, int retry)
+static int dotlock_file (const char *path, int retry)
{
int r;
int flags = DL_FL_USEPRIV | DL_FL_RETRY;
retry = 1;
retry_lock:
- if ((r = invoke_dotlock (path, fd, flags, retry)) == DL_EX_EXIST) {
+ if ((r = invoke_dotlock (path, flags, retry)) == DL_EX_EXIST) {
if (!option (OPTNOCURSES)) {
char msg[LONG_STRING];
return (r == DL_EX_OK ? 0 : -1);
}
-static int undotlock_file (const char *path, int fd)
+static int undotlock_file (const char *path)
{
- return (invoke_dotlock (path, fd, DL_FL_USEPRIV | DL_FL_UNLOCK, 0) ==
+ return (invoke_dotlock (path, DL_FL_USEPRIV | DL_FL_UNLOCK, 0) ==
DL_EX_OK ? 0 : -1);
}
#ifdef USE_DOTLOCK
if (r == 0 && dot)
- r = dotlock_file (path, fd, time_out);
+ r = dotlock_file (path, time_out);
#endif /* USE_DOTLOCK */
if (r == -1) {
#ifdef USE_DOTLOCK
if (dot)
- undotlock_file (path, fd);
+ undotlock_file (path);
#endif
return 0;
}
-void mx_unlink_empty (const char *path)
+static void mx_unlink_empty (const char *path)
{
int fd;
}
#ifdef USE_DOTLOCK
- invoke_dotlock (path, fd, DL_FL_UNLINK, 1);
+ invoke_dotlock (path, DL_FL_UNLINK, 1);
#else
if (fstat (fd, &sb) == 0 && sb.st_size == 0)
unlink (path);
if (magic != M_MAILDIR && magic != M_MH && magic != M_IMAP)
continue;
sidebar_set_current (b->path);
- sidebar_draw (CurrentMenu);
+ sidebar_draw ();
if ((ctx = mx_open_mailbox (b->path,
M_READONLY | M_NOSORT | M_COUNT,
NULL)) != NULL)
if (Context && Context->path)
sidebar_set_current (Context->path);
- sidebar_draw (CurrentMenu);
+ sidebar_draw ();
return (0);
#endif