diff options
| author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2023-08-30 16:07:03 +0200 | 
|---|---|---|
| committer | Sander Vrijders <sander@ouroboros.rocks> | 2023-08-30 17:12:41 +0200 | 
| commit | de2b10441c7835d4221dea3b4414478f72c549f6 (patch) | |
| tree | ead66900f5d6dcd7ecc5b61f97b11a75d10cd123 /src/ipcpd/local | |
| parent | 3a321cc77e0f6d29167a925dd706fc36e5aa7cdd (diff) | |
| download | ouroboros-de2b10441c7835d4221dea3b4414478f72c549f6.tar.gz ouroboros-de2b10441c7835d4221dea3b4414478f72c549f6.zip | |
ipcpd: Revise logging
This revises the logging in the IPCPs to be a more consistent and
reduce duplicate messages in nested functions.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/local')
| -rw-r--r-- | src/ipcpd/local/main.c | 11 | 
1 files changed, 4 insertions, 7 deletions
| diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c index a2f8c6dc..ef1c679b 100644 --- a/src/ipcpd/local/main.c +++ b/src/ipcpd/local/main.c @@ -149,25 +149,22 @@ static int local_ipcp_bootstrap(const struct ipcp_config * conf)          if (pthread_create(&local_data.packet_loop, NULL,                             local_ipcp_packet_loop, NULL)) { +                log_err("Failed to create pthread: %s", strerror(errno));                  ipcp_set_state(IPCP_INIT);                  return -1;          } -        log_info("Bootstrapped local IPCP with pid %d.", getpid()); -          return 0;  }  static int local_ipcp_reg(const uint8_t * hash)  {          if (shim_data_reg_add_entry(local_data.shim_data, hash)) { -                log_dbg("Failed to add " HASH_FMT32 " to local registry.", +                log_err("Failed to add " HASH_FMT32 " to local registry.",                          HASH_VAL32(hash));                  return -1;          } -        log_info("Registered " HASH_FMT32 ".", HASH_VAL32(hash)); -          return 0;  } @@ -226,8 +223,8 @@ static int local_ipcp_flow_alloc_resp(int          fd,                                        const void * data,                                        size_t       len)  { -        int             out_fd = -1; -        time_t          mpl    = IPCP_LOCAL_MPL; +        int    out_fd; +        time_t mpl = IPCP_LOCAL_MPL;          if (ipcp_wait_flow_resp(fd) < 0)                  return -1; | 
