projects
/
svn42.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added timeout for commands
[svn42.git]
/
door_daemon
/
command_queue.h
diff --git
a/door_daemon/command_queue.h
b/door_daemon/command_queue.h
index
61af577
..
d03602f
100644
(file)
--- a/
door_daemon/command_queue.h
+++ b/
door_daemon/command_queue.h
@@
-21,6
+21,8
@@
#ifndef _COMMAND_QUEUE_H_
#define _COMMAND_QUEUE_H_
#ifndef _COMMAND_QUEUE_H_
#define _COMMAND_QUEUE_H_
+#include <sys/time.h>
+
enum cmd_id_enum { OPEN, CLOSE, TOGGLE, RESET, STATUS, LOG };
typedef enum cmd_id_enum cmd_id_t;
enum cmd_id_enum { OPEN, CLOSE, TOGGLE, RESET, STATUS, LOG };
typedef enum cmd_id_enum cmd_id_t;
@@
-29,11
+31,13
@@
struct cmd_struct {
cmd_id_t cmd;
char* param;
int sent;
cmd_id_t cmd;
char* param;
int sent;
+ struct timeval tv_start;
struct cmd_struct* next;
};
typedef struct cmd_struct cmd_t;
int cmd_push(cmd_t** first, int fd, cmd_id_t cmd, const char* param);
struct cmd_struct* next;
};
typedef struct cmd_struct cmd_t;
int cmd_push(cmd_t** first, int fd, cmd_id_t cmd, const char* param);
+int cmd_has_expired(const cmd_t cmd);
void cmd_pop(cmd_t** first);
void cmd_clear(cmd_t** first);
void cmd_pop(cmd_t** first);
void cmd_clear(cmd_t** first);