#include "logger.h"
#include "dns.h"
-rb_dlink_list shared_conf_list;
rb_dlink_list cluster_conf_list;
rb_dlink_list oper_conf_list;
rb_dlink_list hubleaf_conf_list;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
- RB_DLINK_FOREACH_SAFE(ptr, next_ptr, shared_conf_list.head)
- {
- /* ptr here is ptr->data->node */
- rb_dlinkDelete(ptr, &shared_conf_list);
- free_remote_conf(ptr->data);
- }
-
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, cluster_conf_list.head)
{
rb_dlinkDelete(ptr, &cluster_conf_list);
rb_free(remote_p);
}
-bool
-find_shared_conf(const char *username, const char *host,
- const char *server, int flags)
-{
- struct remote_conf *shared_p;
- rb_dlink_node *ptr;
-
- RB_DLINK_FOREACH(ptr, shared_conf_list.head)
- {
- shared_p = ptr->data;
-
- if(match(shared_p->username, username) &&
- match(shared_p->host, host) &&
- match(shared_p->server, server))
- {
- if(shared_p->flags & flags)
- return true;
- else
- return false;
- }
- }
-
- return false;
-}
-
void
propagate_generic(struct Client *source_p, const char *command,
const char *target, int cap, const char *format, ...)
if(aftype == AF_INET)
{
if(status == 1)
- rb_inet_pton_sock(result, (struct sockaddr *)&server_p->connect4);
+ rb_inet_pton_sock(result, &server_p->connect4);
server_p->dns_query_connect4 = 0;
}
else if(aftype == AF_INET6)
{
if(status == 1)
- rb_inet_pton_sock(result, (struct sockaddr *)&server_p->connect6);
+ rb_inet_pton_sock(result, &server_p->connect6);
server_p->dns_query_connect6 = 0;
}
if(aftype == AF_INET)
{
if(status == 1)
- rb_inet_pton_sock(result, (struct sockaddr *)&server_p->bind4);
+ rb_inet_pton_sock(result, &server_p->bind4);
server_p->dns_query_bind4 = 0;
}
else if(aftype == AF_INET6)
{
if(status == 1)
- rb_inet_pton_sock(result, (struct sockaddr *)&server_p->bind6);
+ rb_inet_pton_sock(result, &server_p->bind6);
server_p->dns_query_bind6 = 0;
}