]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - command.c
wma: Rename comment_header.
[paraslash.git] / command.c
index 6880cb4091a008b7063f5d7bed43f1ceda8ee5ac..43f85ca67a5e7b35c56d430f7da75cfdb64c7f94 100644 (file)
--- a/command.c
+++ b/command.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1997-2014 Andre Noll <maan@tuebingen.mpg.de>
+ * Copyright (C) 1997 Andre Noll <maan@tuebingen.mpg.de>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -35,8 +35,8 @@
 #include "fd.h"
 #include "ipc.h"
 #include "user_list.h"
-#include "server_command_list.h"
-#include "afs_command_list.h"
+#include "server.command_list.h"
+#include "afs.command_list.h"
 #include "signal.h"
 #include "version.h"
 
@@ -210,7 +210,7 @@ static int check_sender_args(int argc, char * const * argv, struct sender_comman
  *
  * The nonblock flag must be disabled for the file descriptor given by \a scc.
  *
- * Stream cipher encryption is automatically activated if neccessary via the
+ * Stream cipher encryption is automatically activated if necessary via the
  * sideband transformation, depending on the value of \a band.
  *
  * \return Standard.
@@ -363,8 +363,10 @@ static int com_sender(struct command_context *cc)
        for (i = 0; i < 10; i++) {
                mutex_lock(mmd_mutex);
                if (mmd->sender_cmd_data.cmd_num >= 0) {
+                       /* another sender command is active, retry in 100ms */
+                       struct timespec ts = {.tv_nsec = 100 * 1000 * 1000};
                        mutex_unlock(mmd_mutex);
-                       usleep(100 * 1000);
+                       nanosleep(&ts, NULL);
                        continue;
                }
                mmd->sender_cmd_data = scd;