mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 01:57:26 +00:00
watchfrr: Convert daemon_state_t to an enum instead of a typedef
Align watchfrr with our coding standard Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
f1692c510b
commit
c3db4ca8ed
@ -136,13 +136,13 @@ static struct global_state {
|
|||||||
.stop_command = DEFAULT_STOP_CMD,
|
.stop_command = DEFAULT_STOP_CMD,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
enum daemon_state {
|
||||||
DAEMON_INIT,
|
DAEMON_INIT,
|
||||||
DAEMON_DOWN,
|
DAEMON_DOWN,
|
||||||
DAEMON_CONNECTING,
|
DAEMON_CONNECTING,
|
||||||
DAEMON_UP,
|
DAEMON_UP,
|
||||||
DAEMON_UNRESPONSIVE
|
DAEMON_UNRESPONSIVE
|
||||||
} daemon_state_t;
|
};
|
||||||
|
|
||||||
#define IS_UP(DMN) \
|
#define IS_UP(DMN) \
|
||||||
(((DMN)->state == DAEMON_UP) || ((DMN)->state == DAEMON_UNRESPONSIVE))
|
(((DMN)->state == DAEMON_UP) || ((DMN)->state == DAEMON_UNRESPONSIVE))
|
||||||
@ -153,7 +153,7 @@ static const char *const state_str[] = {
|
|||||||
|
|
||||||
struct daemon {
|
struct daemon {
|
||||||
const char *name;
|
const char *name;
|
||||||
daemon_state_t state;
|
enum daemon_state state;
|
||||||
int fd;
|
int fd;
|
||||||
struct timeval echo_sent;
|
struct timeval echo_sent;
|
||||||
unsigned int connect_tries;
|
unsigned int connect_tries;
|
||||||
|
Loading…
Reference in New Issue
Block a user