| summaryrefslogtreecommitdiff | 
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-23 15:08:33 +0200 | 
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-23 15:08:33 +0200 | 
| commit | 45e71e07bbc891e552de58d5ba827ad719d90662 (patch) | |
| tree | b9741ac85661e397213923b1ff60bf862a1fb5a0 /src/config.c | |
| parent | b1525c35503cafafd69aa63dedddf49bd00bac5f (diff) | |
Currently facing "Bad file descriptor" errors...
Diffstat (limited to 'src/config.c')
| -rw-r--r-- | src/config.c | 31 | 
1 files changed, 14 insertions, 17 deletions
| diff --git a/src/config.c b/src/config.c index 3b8eb0a..bb78779 100644 --- a/src/config.c +++ b/src/config.c @@ -244,6 +244,7 @@ static int read_axis_options     return -1;  } +/*  static int parse_timeout_option  (     struct relabsd_config * const conf, @@ -295,6 +296,8 @@ static int parse_timeout_option     memset((void *) &(conf->timeout), 0, sizeof(struct timeval)); +   conf->timeout.tv_sec = (time_t) (timeout_msec / 1000); +     conf->timeout.tv_usec =        (           ((suseconds_t) timeout_msec) @@ -303,6 +306,7 @@ static int parse_timeout_option     return 0;  } +*/  /*   * Returns -1 on (fatal) error, @@ -322,22 +326,6 @@ static int parse_axis_configuration_line     if (axis == RELABSD_UNKNOWN)     { -      if (RELABSD_STRING_EQUALS("timeout", buffer)) -      { -         if (parse_timeout_option(conf, f) < 0) -         { -            RELABSD_FATAL -            ( -               "[CONFIG] Issue while parsing timeout option '%s'.", -               buffer -            ); - -            return -1; -         } - -         return 0; -      } -        RELABSD_FATAL        (           "[CONFIG] Unknown axis '%s'.", @@ -468,7 +456,6 @@ static int read_config_file        return -1;     } -   conf->enable_timeout = 0;     prev_errno = errno;     errno = 0; @@ -620,6 +607,16 @@ int relabsd_config_parse        return -1;     } +   conf->enable_timeout = RELABSD_ENABLE_TIMEOUT; + +   conf->timeout.tv_sec = (time_t) (RELABSD_TIMEOUT_MSEC / 1000); + +   conf->timeout.tv_usec = +      ( +         ((suseconds_t) RELABSD_TIMEOUT_MSEC) +         * ((suseconds_t) 1000) +      ); +     return 0;  } | 


