* The *reported* state changes because
* the internal state machine NEEDS THE
* RIGHT STATE. However, reporting that
- * to the admin will confuse him. So...
- * we lie. Yes, that dress doesn't make
- * you look fat.
+ * to the admin will confuse them.
+ * So... we lie. No, that dress doesn't
+ * make you look fat...
*/
- if ((home->last_packet_recv + home->ping_interval) >= now) {
+ if ((home->last_packet_recv + (int)home->ping_interval) >= now) {
state = "alive";
} else {
state = "unknown";
* retry it.
*/
case STATE_RUNNING:
- if (time(NULL) < (data->running + data->retry_interval)) {
+ if (time(NULL) < (data->running + (int)data->retry_interval)) {
return NULL;
}
home->response_window.tv_usec = tmp;
} else {
- uint32_t tmp = home->response_window.tv_sec; /* which isn't an integer */
+ int tmp = (int)home->response_window.tv_sec; /* which isn't an integer */
FR_INTEGER_BOUND_CHECK("response_window", tmp, <=, 60);
- FR_INTEGER_BOUND_CHECK("response_window", tmp, <=, main_config.max_request_time);
- FR_INTEGER_BOUND_CHECK("response_window", tmp, <=, main_config.max_request_time);
+ FR_INTEGER_BOUND_CHECK("response_window", tmp, <=, (int)main_config.max_request_time);
if (home->response_window.tv_sec != tmp) {
home->response_window.tv_sec = tmp;
* passed since we last created one. This helps to minimize
* the amount of create/delete cycles.
*/
- if ((now - thread_pool.time_last_spawned) < thread_pool.cleanup_delay) {
+ if ((now - thread_pool.time_last_spawned) < (int)thread_pool.cleanup_delay) {
return;
}
* FIXME: Also do it every N sessions?
*/
if (conf->session_cache_enable &&
- ((conf->session_last_flushed + (conf->session_timeout * 1800)) <= request->timestamp)){
+ ((conf->session_last_flushed + ((int)conf->session_timeout * 1800)) <= request->timestamp)){
RDEBUG2("Flushing SSL sessions (of #%ld)",
SSL_CTX_sess_number(conf->ctx));
* Expire entries from the start of the list.
* They should be the oldest ones.
*/
- if ((timestamp - handler->timestamp) > inst->timer_limit) {
+ if ((timestamp - handler->timestamp) > (int)inst->timer_limit) {
rbnode_t *node;
node = rbtree_find(inst->session_tree, handler);
rad_assert(node != NULL);
* State is valid, but check expiry.
*/
then = ntohl(then);
- if (time(NULL) - then > inst->challenge_delay) {
+ if ((time(NULL) - then) > (int)inst->challenge_delay) {
REDEBUG("bad radstate for [%s]: expired",username);
return RLM_MODULE_REJECT;