diff options
author | Dimitri Staessens <[email protected]> | 2024-01-21 10:59:17 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2024-01-31 10:27:56 +0100 |
commit | 02f68ff5ccc637b2177f832a4f7ddf4f9f737d22 (patch) | |
tree | eeef68d751d4feb0c95b3831b3e325d45ca9bc9b /src/irmd/main.c | |
parent | 396c311842ae7d138c13a6d054e1978d95af4c63 (diff) | |
download | ouroboros-02f68ff5ccc637b2177f832a4f7ddf4f9f737d22.tar.gz ouroboros-02f68ff5ccc637b2177f832a4f7ddf4f9f737d22.zip |
include: Use common definition between lib and IRMd
Some definitions/enums were different between the library and IRMd
(flow_state, ipcp_state). This moves them to common ground.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/irmd/main.c')
-rw-r--r-- | src/irmd/main.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c index 20b70a60..31ac5edc 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -30,23 +30,23 @@ #define OUROBOROS_PREFIX "irmd" +#include <ouroboros/bitmap.h> #include <ouroboros/crypt.h> -#include <ouroboros/hash.h> #include <ouroboros/errno.h> -#include <ouroboros/sockets.h> -#include <ouroboros/list.h> -#include <ouroboros/utils.h> +#include <ouroboros/flow.h> +#include <ouroboros/hash.h> #include <ouroboros/irm.h> +#include <ouroboros/list.h> #include <ouroboros/lockfile.h> +#include <ouroboros/logs.h> +#include <ouroboros/pthread.h> #include <ouroboros/shm_rbuff.h> #include <ouroboros/shm_rdrbuff.h> -#include <ouroboros/bitmap.h> -#include <ouroboros/qos.h> +#include <ouroboros/sockets.h> #include <ouroboros/time_utils.h> #include <ouroboros/tpm.h> -#include <ouroboros/logs.h> +#include <ouroboros/utils.h> #include <ouroboros/version.h> -#include <ouroboros/pthread.h> #include "irmd.h" #include "ipcp.h" @@ -586,7 +586,9 @@ static int create_ipcp_r(pid_t pid, list_for_each(p, &irmd.ipcps) { struct reg_ipcp * e = list_entry(p, struct reg_ipcp, next); if (e->pid == pid) { - reg_ipcp_set_state(e, result ? IPCP_NULL : IPCP_LIVE); + enum ipcp_state state; + state = result ? IPCP_NULL : IPCP_OPERATIONAL; + reg_ipcp_set_state(e, state); break; } } @@ -660,7 +662,7 @@ int bootstrap_ipcp(pid_t pid, return -ENOMEM; } - ipcp->dir_hash_algo = info.dir_hash_algo; + ipcp->dir_hash_algo = (enum hash_algo) info.dir_hash_algo; pthread_rwlock_unlock(&irmd.reg_lock); @@ -714,7 +716,7 @@ int enroll_ipcp(pid_t pid, return -ENOMEM; } - ipcp->dir_hash_algo = info.dir_hash_algo; + ipcp->dir_hash_algo = (enum hash_algo) info.dir_hash_algo; pthread_rwlock_unlock(&irmd.reg_lock); |