rad_assert(this->used == FALSE);
- radlog(L_INFO, "%s: Closing connection (%i)", fc->log_prefix, this->number);
-
fr_connection_unlink(fc, this);
fc->delete(fc->ctx, this->connection);
rad_assert(fc->num > 0);
fc->active--;
}
+ radlog(L_INFO, "%s: Deleting connection (%i)", fc->log_prefix,
+ this->number);
+
fr_connection_close(fc, this);
fr_connection_pool_check(fc);
return 1;
for (this = fc->head; this != NULL; this = next) {
next = this->next;
+
+ radlog(L_INFO, "%s: Closing connection (%i)", fc->log_prefix,
+ this->number);
+
fr_connection_close(fc, this);
}
lp_len = (sizeof(LOG_PREFIX) - 4) + strlen(cs_name1) + strlen(cs_name2);
fc->log_prefix = rad_malloc(lp_len);
- snprintf(fc->log_prefix, lp_len, LOG_PREFIX, cs_name1, cs_name2);
+ snprintf(fc->log_prefix, lp_len, LOG_PREFIX, cs_name1,
+ cs_name2);
}
} else { /* not a module configuration */
cs_name1 = cf_section_name1(parent);
if ((fc->max_uses > 0) &&
(this->num_uses >= fc->max_uses)) {
- radlog(L_INFO, "%s: Closing expired connection (%i): Hit max_uses limit",
- fc->log_prefix, this->number);
+ radlog(L_INFO, "%s: Closing expired connection (%i): Hit "
+ "max_uses limit", fc->log_prefix, this->number);
do_delete:
if ((fc->num <= fc->min) &&
(fc->last_complained < now)) {
- radlog(L_INFO, "%s: WARNING: You probably need to lower \"min\"", fc->log_prefix);
+ radlog(L_INFO, "%s: WARNING: You probably need to "
+ "lower \"min\"", fc->log_prefix);
fc->last_complained = now;
}
fr_connection_close(fc, this);
rad_assert(idle != NULL);
- radlog(L_INFO, "%s: Closing idle connection (%i): Too many free connections (%d > %d)",
- fc->log_prefix, idle->number, spare, fc->spare);
+ radlog(L_INFO, "%s: Closing idle connection (%i): Too many "
+ "free connections (%d > %d)", fc->log_prefix,
+ idle->number, spare, fc->spare);
fr_connection_close(fc, idle);
}
}
pthread_mutex_unlock(&fc->mutex);
- radlog(L_ERR, "%s: No connections available and at max connection limit",
- fc->log_prefix);
+ radlog(L_ERR, "%s: No connections available and at max "
+ "connection limit", fc->log_prefix);
return NULL;
}
if (!now) return NULL;
- radlog(L_ERR, "%s: Failed to reconnect (%i), and no other connections available",
- fc->log_prefix, conn_number);
+ radlog(L_ERR, "%s: Failed to reconnect (%i), and no other "
+ "connections available", fc->log_prefix, conn_number);
return NULL;
}