-void connect_resolver_host(struct host *host, iochan_man_t iochan_man)
-{
- struct connection *con;
-
- yaz_mutex_enter(host->mutex);
- con = host->connections;
- while (con)
- {
- if (con->state == Conn_Resolving)
- {
- if (!host->ipport) /* unresolved */
- {
- yaz_mutex_leave(host->mutex);
- connection_destroy(con);
- /* start all over .. at some point it will be NULL */
- con = host->connections;
- }
- else if (!con->client)
- {
- yaz_mutex_leave(host->mutex);
- connection_destroy(con);
- /* start all over .. at some point it will be NULL */
- con = host->connections;
- }
- else
- {
- yaz_mutex_leave(host->mutex);
- connection_connect(con, iochan_man);
- client_start_search(con->client);
- con = host->connections;
- }
- }
- else
- {
- yaz_log(YLOG_LOG, "connect_resolver_host: state=%d", con->state);
- con = con->next;
- }
- }
- yaz_mutex_leave(host->mutex);
-}
-