summaryrefslogtreecommitdiff
path: root/src/socket.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-02-03 02:31:54 +0100
committerLennart Poettering <lennart@poettering.net>2012-02-03 05:06:03 +0100
commitcfc4eb4cbaa3434fac145cbabbd51c5f41bd20a6 (patch)
tree70c30a0e0a83e41133c441fd4bdc09c2b6a61a11 /src/socket.h
parentf42806df7de0f4669c1296ab66a7f8d8784dd0f2 (diff)
socket: replace failure boolean by enum
Diffstat (limited to 'src/socket.h')
-rw-r--r--src/socket.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/socket.h b/src/socket.h
index b6df83aee5..d242796a31 100644
--- a/src/socket.h
+++ b/src/socket.h
@@ -65,6 +65,17 @@ typedef enum SocketType {
_SOCKET_FIFO_INVALID = -1
} SocketType;
+typedef enum SocketResult {
+ SOCKET_SUCCESS,
+ SOCKET_FAILURE_RESOURCES,
+ SOCKET_FAILURE_TIMEOUT,
+ SOCKET_FAILURE_EXIT_CODE,
+ SOCKET_FAILURE_SIGNAL,
+ SOCKET_FAILURE_CORE_DUMP,
+ _SOCKET_RESULT_MAX,
+ _SOCKET_RESULT_INVALID = -1
+} SocketResult;
+
typedef struct SocketPort {
SocketType type;
int fd;
@@ -107,7 +118,7 @@ struct Socket {
mode_t directory_mode;
mode_t socket_mode;
- bool failure;
+ SocketResult result;
bool accept;
@@ -154,4 +165,7 @@ SocketState socket_state_from_string(const char *s);
const char* socket_exec_command_to_string(SocketExecCommand i);
SocketExecCommand socket_exec_command_from_string(const char *s);
+const char* socket_result_to_string(SocketResult i);
+SocketResult socket_result_from_string(const char *s);
+
#endif