X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=43f85ca67a5e7b35c56d430f7da75cfdb64c7f94;hp=6880cb4091a008b7063f5d7bed43f1ceda8ee5ac;hb=4ce5e90617837e558a35e411ae66eaf16a9e73f8;hpb=144c8da3fb211847623e6d258b4c1f55112e2779 diff --git a/command.c b/command.c index 6880cb40..43f85ca6 100644 --- a/command.c +++ b/command.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2014 Andre Noll + * Copyright (C) 1997 Andre Noll * * 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;