StrBufAppendBufPlain(OutputBuffer, HKEY("\n"), 0);
}
-int is_recipient(OneRoomNetCfg *RNCfg, const char *Name)
-{
- const RoomNetCfg RecipientCfgs[] = {
- listrecp,
- digestrecp,
- participate,
- maxRoomNetCfg
- };
- int i;
- RoomNetCfgLine *nptr;
- size_t len;
-
- len = strlen(Name);
- i = 0;
- while (RecipientCfgs[i] != maxRoomNetCfg)
- {
- nptr = RNCfg->NetConfigs[RecipientCfgs[i]];
-
- while (nptr != NULL)
- {
- if ((StrLength(nptr->Value) == len) &&
- (!strcmp(Name, ChrPtr(nptr->Value))))
- {
- return 1;
- }
- nptr = nptr->next;
- }
- }
- return 0;
-}
-
/*
* Batch up and send all outbound traffic from the current room
/* route the message */
Buf = NewStrBufPlain(msg->cm_fields['D'], -1);
- if (is_valid_node(&nexthop,
- NULL,
- Buf,
- working_ignetcfg,
- the_netmap) == 0)
+ if (CtdlIsValidNode(&nexthop,
+ NULL,
+ Buf,
+ working_ignetcfg,
+ the_netmap) == 0)
{
/* prepend our node to the path */
if (msg->cm_fields['P'] != NULL) {
/* Learn network topology from the path */
if ((msg->cm_fields['N'] != NULL) && (msg->cm_fields['P'] != NULL)) {
- network_learn_topology(msg->cm_fields['N'],
- msg->cm_fields['P'],
- the_netmap,
- netmap_changed);
+ NetworkLearnTopology(msg->cm_fields['N'],
+ msg->cm_fields['P'],
+ the_netmap,
+ netmap_changed);
}
/* Is the sending node giving us a very persuasive suggestion about
ChrPtr(NextHop));
QN_syslog(LOG_DEBUG, "Consolidate %s to %s\n", filename, ChrPtr(NextHop));
- if (network_talking_to(SKEY(NextHop), NTT_CHECK)) {
+ if (CtdlNetworkTalkingTo(SKEY(NextHop), NTT_CHECK)) {
nFailed++;
QN_syslog(LOG_DEBUG,
"Currently online with %s - skipping for now\n",
size_t fsize;
int infd, outfd;
const char *err = NULL;
- network_talking_to(SKEY(NextHop), NTT_ADD);
+ CtdlNetworkTalkingTo(SKEY(NextHop), NTT_ADD);
infd = open(filename, O_RDONLY);
if (infd == -1) {
"failed to open %s for reading due to %s; skipping.\n",
filename, strerror(errno)
);
- network_talking_to(SKEY(NextHop), NTT_REMOVE);
+ CtdlNetworkTalkingTo(SKEY(NextHop), NTT_REMOVE);
continue;
}
spooloutfilename, strerror(errno)
);
close(infd);
- network_talking_to(SKEY(NextHop), NTT_REMOVE);
+ CtdlNetworkTalkingTo(SKEY(NextHop), NTT_REMOVE);
continue;
}
FDIOBufferDelete(&FDIO);
close(infd);
close(outfd);
- network_talking_to(SKEY(NextHop), NTT_REMOVE);
+ CtdlNetworkTalkingTo(SKEY(NextHop), NTT_REMOVE);
}
}
closedir(dp);
filedir_entry->d_name
);
- i = is_valid_node(&nexthop,
- NULL,
- NextHop,
- working_ignetcfg,
- the_netmap);
+ i = CtdlIsValidNode(&nexthop,
+ NULL,
+ NextHop,
+ working_ignetcfg,
+ the_netmap);
if ( (i != 0) || (StrLength(nexthop) > 0) ) {
unlink(filename);