From: <val...@us...> - 2004-12-30 14:37:32
|
Update of /cvsroot/husky/hpt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29738 Modified Files: hptafix.c perl.c toss.c Log Message: move all robot-dependent stuff from s_link to s_link_robot Index: hptafix.c =================================================================== RCS file: /cvsroot/husky/hpt/src/hptafix.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- hptafix.c 28 Dec 2004 20:51:14 -0000 1.15 +++ hptafix.c 30 Dec 2004 14:37:14 -0000 1.16 @@ -108,20 +108,8 @@ return rcc; } -void getLinkData(s_link *link, s_linkdata *linkData) -{ - linkData->robot = link->RemoteRobotName ? link->RemoteRobotName : "areafix"; - linkData->pwd = link->areaFixPwd ? link->areaFixPwd : "\x00"; - linkData->attrs = link->areafixReportsAttr ? link->areafixReportsAttr : robot->reportsAttr; - linkData->flags = link->areafixReportsFlags ? link->areafixReportsFlags : robot->reportsFlags; - linkData->numFrMask = link->numFrMask; - linkData->frMask = link->frMask; - linkData->numDfMask = link->numDfMask; - linkData->dfMask = link->dfMask; - linkData->denyFwdFile = link->denyFwdFile; - linkData->fwd = link->forwardRequests; - linkData->fwdFile = link->forwardRequestFile; - linkData->advAfix = link->advancedAreafix; +s_link_robot *getLinkRobot(s_link *link) { + return &(link->areafix); } void autoPassive() @@ -169,7 +157,7 @@ config->links[i], 1, config->links[i]->Pause^(ECHOAREA|FILEAREA))) { UINT j, k; - int mask = config->links[i]->areafixReportsAttr ? config->links[i]->areafixReportsAttr : robot->reportsAttr; + int mask = config->links[i]->areafix.reportsAttr ? config->links[i]->areafix.reportsAttr : robot->reportsAttr; msg = makeMessage(config->links[i]->ourAka, &(config->links[i]->hisAka), robot->fromName ? robot->fromName : versionStr, @@ -241,6 +229,7 @@ af_silent_mode = silent_mode; af_report_changes = report_changes; af_send_notify = cmNotifyLink; + af_pause = ECHOAREA; /* callbacks and hooks */ call_sstrdup = &safe_strdup; call_smalloc = &safe_malloc; @@ -248,7 +237,7 @@ call_sendMsg = &afSendMsg; call_writeMsgToSysop = &afWriteMsgToSysop; - call_getLinkData = &getLinkData; + call_getLinkRobot = &getLinkRobot; hook_onDeleteArea = &afDeleteArea; hook_onRescanArea = &afRescanArea; hook_onAutoCreate = &afReportAutoCreate; Index: perl.c =================================================================== RCS file: /cvsroot/husky/hpt/src/perl.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- perl.c 25 Dec 2004 21:48:27 -0000 1.84 +++ perl.c 30 Dec 2004 14:37:15 -0000 1.85 @@ -1109,16 +1109,16 @@ VK_ADD_HASH_str(hv2, sv, "aka", aka2str(*config->links[i]->ourAka)); VK_ADD_HASH_str(hv2, sv, "password", config->links[i]->defaultPwd); VK_ADD_HASH_str(hv2, sv, "filebox", config->links[i]->fileBox); - VK_ADD_HASH_str(hv2, sv, "robot", config->links[i]->RemoteRobotName); + VK_ADD_HASH_str(hv2, sv, "robot", config->links[i]->areafix.name); VK_ADD_HASH_int(hv2, sv, "flavour", flv2flag(config->links[i]->netMailFlavour)); VK_ADD_HASH_int(hv2, sv, "eflavour", flv2flag(config->links[i]->echoMailFlavour)); VK_ADD_HASH_int(hv2, sv, "pause", getPause( config->links[i] )); VK_ADD_HASH_int(hv2, sv, "level", config->links[i]->level); VK_ADD_HASH_int(hv2, sv, "advAfix", config->links[i]->advancedAreafix); - VK_ADD_HASH_int(hv2, sv, "echoLimit", config->links[i]->afixEchoLimit); - VK_ADD_HASH_int(hv2, sv, "forwreqs", config->links[i]->forwardRequests); - VK_ADD_HASH_str(hv2, sv, "forwreqsFile", config->links[i]->forwardRequestFile); - VK_ADD_HASH_int(hv2, sv, "forwreqsPrio", config->links[i]->forwardAreaPriority); + VK_ADD_HASH_int(hv2, sv, "echoLimit", config->links[i]->areafix.echoLimit); + VK_ADD_HASH_int(hv2, sv, "forwreqs", config->links[i]->areafix.forwardRequests); + VK_ADD_HASH_str(hv2, sv, "forwreqsFile", config->links[i]->areafix.fwdFile); + VK_ADD_HASH_int(hv2, sv, "forwreqsPrio", config->links[i]->areafix.forwardPriority); VK_ADD_HASH_int(hv2, sv, "reducedSeenBy", config->links[i]->reducedSeenBy); VK_ADD_HASH_int(hv2, sv, "noRules", config->links[i]->noRules); VK_ADD_HASH_int(hv2, sv, "pktSize", config->links[i]->pktSize); Index: toss.c =================================================================== RCS file: /cvsroot/husky/hpt/src/toss.c,v retrieving revision 1.538 retrieving revision 1.539 diff -u -d -r1.538 -r1.539 --- toss.c 25 Dec 2004 21:48:27 -0000 1.538 +++ toss.c 30 Dec 2004 14:37:22 -0000 1.539 @@ -868,11 +868,11 @@ tmpmsg = makeMessage(link->ourAka, &(link->hisAka), robot->fromName ? robot->fromName : versionStr, link->name, "Notification message", 1, - link->areafixReportsAttr ? link->areafixReportsAttr : robot->reportsAttr); + link->areafix.reportsAttr ? link->areafix.reportsAttr : robot->reportsAttr); tmpmsg->text = createKludges(config, NULL, link->ourAka, &(link->hisAka), versionStr); - if (link->areafixReportsFlags) - xstrscat(&(tmpmsg->text), "\001FLAGS ", link->areafixReportsFlags, "\r",NULL); + if (link->areafix.reportsFlags) + xstrscat(&(tmpmsg->text), "\001FLAGS ", link->areafix.reportsFlags, "\r",NULL); else if (robot->reportsFlags) xstrscat(&(tmpmsg->text), "\001FLAGS ", robot->reportsFlags, "\r",NULL); |