X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=a9f5aa697be2e3f7ab51819898b14afb7d0535c6;hp=6880cb4091a008b7063f5d7bed43f1ceda8ee5ac;hb=32a81d7eecfa5c8585d7095631ff2cd8b7b1bf7a;hpb=144c8da3fb211847623e6d258b4c1f55112e2779 diff --git a/command.c b/command.c index 6880cb40..a9f5aa69 100644 --- a/command.c +++ b/command.c @@ -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" @@ -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;