FACT++  1.0
int did_init ( char *  local_node,
int  dns_port 
)

Definition at line 122 of file webDid.c.

References dic_disable_padding(), dic_get_dns_port(), dic_info_service(), dim_get_dns_node(), dim_init(), dim_print_date_time(), dim_set_dns_node(), dis_disable_padding(), DNS_PORT, dtq_create(), MONITORED, no_link, sprintf(), Timer_q, Title, and update_servers().

123 {
124  void update_servers();
125  char icon_title[128];
126  char dns_node[128];
127  int ret;
128 
129  dim_init();
132 
133  ret = dim_get_dns_node(dns_node);
134  if(!ret)
135  {
136  strcpy(dns_node, local_node);
137  dim_set_dns_node(dns_node);
138  }
139  dns_port = dic_get_dns_port();
140  if(dns_port != DNS_PORT)
141  {
142  sprintf(Title,"DIM DNS: %s:%d",dns_node,dns_port);
143  }
144  else
145  {
146  sprintf(Title,"DIM DNS: %s",dns_node);
147  }
148  sprintf(icon_title,"DID %s",dns_node);
150 printf("webDid Starting up on %s\n\t serving %s\n", local_node, Title);
151  Timer_q = dtq_create();
152  dic_info_service("DIS_DNS/SERVER_INFO",MONITORED,0,0,0,update_servers,0,
153  &no_link,1);
154  return 1;
155 }
char Title[128]
Definition: webDid.c:120
void dis_disable_padding()
Definition: copy_swap.c:30
unsigned dic_info_service(char *serv_name, int req_type, int req_timeout, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, void *fill_addr, int fill_size)
Definition: dic.c:601
int dim_set_dns_node(char *node)
Definition: open_dns.c:50
#define MONITORED
Definition: dim_common.h:9
int dtq_create()
Definition: dtq.c:353
int dic_get_dns_port()
Definition: open_dns.c:130
void update_servers(int *tag, DNS_DID *buffer, int *size)
Definition: webDid.c:304
int dim_get_dns_node(char *node)
Definition: open_dns.c:72
void dim_init()
Definition: dim_thr.c:111
static char no_link
Definition: webDid.c:107
void dic_disable_padding()
Definition: copy_swap.c:25
int Timer_q
Definition: webDid.c:119
void dim_print_date_time()
Definition: utilities.c:134
sprintf(name1,"NewService%d", i)
#define DNS_PORT
Definition: dim.h:139

+ Here is the call graph for this function: