- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name: Roman
Subject: Re: ðÒÏÂÌÅÍÙ ÉÎÄÅËÓÁÃÉÉ
÷ÓÑ ÐÒÏÂÌÅÍÁ ÚÄÅÓØ, proto.c:
if (bind(net, (struct sockaddr *)&Agent->Flags.bind_addr,
sizeof(Agent->Flags.bind_addr)) < 0) {
DpsLog(Agent, DPS_LOG_ERROR, "bind() to %s error %d %s",
inet_ntoa(Agent->Flags.bind_addr.sin_addr), errno, strerror(errno));
dps_closesocket(net);
return DPS_NET_CANT_CONNECT;
}
config.c:
static int env_rpl_var(void *Cfg, size_t ac,char **av){
DPS_CFG *C=(DPS_CFG*)Cfg;
DPS_ENV *Conf=C->Indexer->Conf;
if(!strcasecmp(av[0],"DBAddr")){
if(DPS_OK != DpsDBListAdd(&Conf->dbl, av[1] ? av[1] : "",
DPS_OPEN_MODE_WRITE)){
dps_snprintf(Conf->errstr, sizeof(Conf->errstr) - 1,
"Invalid DBAddr: '%s'",av[1]?av[1]:"");
return DPS_ERROR;
}
}else if(!strcasecmp(av[0],"Bind")){
Conf->Flags.bind_addr.sin_addr.s_addr = inet_addr(av[1]);
Conf->Flags.bind_addr.sin_port = htons(0 /*4096 + time(NULL) %
16384*/);
Conf->Flags.bind_addr.sin_family = AF_INET;
}
DpsVarListReplaceStr(&Conf->Vars,av[0],av[1]);
return DPS_OK;
}
úÁËÏÍÅÎÔÉÒÏ×ÁÌ, ×Ó£ ÒÁÂÏÔÁÅÔ É ÎÅ ÐÏÎÑÔÎÏ ÚÁÞÅÍ bind ÏÔ ÓÅÒ×ÅÒÁ ÔÁÍ ÓÔÏÉÔ, ÍÙ
×ÒÏÄÅ ÐÏÌÕÞÁÅÍ ÄÁÎÎÎÙÅ, Á ÎÅ ÏÔÄÁ£Í, ÐÒÉÞ£Í ÐÏÒÔ 0 É ÎÅ ÐÏÎÑÔÎÏÅ av[1].
ñ ×ÏÔ ÅÝ£ ÎÅ ÐÏÎÑÌ ÐÏÞÅÍÕ connect_tm Ä×Á ÒÁÚÁ ÐÏÄÒÑÔ ÚÁÐÒÁÛÉ×ÁÅÔ ÓÅÒ×ÅÒ
ÉÎÄÅËÓÁÃÉÉ.
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Read the full topic here:
http://www.dataparksearch.org/cgi-bin/simpleforum.cgi?fid=04;topic_id=1126074737;page=2