Implemented nodelist fields8 search for FQDN
This commit is contained in:
@@ -168,8 +168,8 @@ void Kill(void)
|
||||
if (area.MoveArea) {
|
||||
fseek(pAreas, ((area.MoveArea -1) * areahdr.recsize) + areahdr.hdrsize, SEEK_SET);
|
||||
fread(&darea, areahdr.recsize, 1, pAreas);
|
||||
sprintf(from, "%s/%s", area.Path, file.LName);
|
||||
sprintf(to, "%s/%s", darea.Path, file.LName);
|
||||
sprintf(from, "%s/%s", area.Path, file.Name);
|
||||
sprintf(to, "%s/%s", darea.Path, file.Name);
|
||||
if ((rc = file_mv(from, to)) == 0) {
|
||||
Syslog('+', "Move %s, area %d => %d", file.Name, i, area.MoveArea);
|
||||
sprintf(to, "%s/fdb/fdb%d.data", getenv("MBSE_ROOT"), area.MoveArea);
|
||||
@@ -179,13 +179,28 @@ void Kill(void)
|
||||
fwrite(&file, sizeof(file), 1, pDest);
|
||||
fclose(pDest);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now again if there is a dotted version (thumbnail) of this file.
|
||||
*/
|
||||
sprintf(from, "%s/.%s", area.Path, file.LName);
|
||||
sprintf(to, "%s/.%s", darea.Path, file.LName);
|
||||
sprintf(from, "%s/.%s", area.Path, file.Name);
|
||||
sprintf(to, "%s/.%s", darea.Path, file.Name);
|
||||
if (file_exist(from, R_OK) == 0)
|
||||
file_mv(from, to);
|
||||
|
||||
/*
|
||||
* Unlink the old symbolic link
|
||||
*/
|
||||
sprintf(from, "%s/%s", area.Path, file.LName);
|
||||
unlink(from);
|
||||
|
||||
/*
|
||||
* Create the new symbolic link
|
||||
*/
|
||||
sprintf(from, "%s/%s", darea.Path, file.Name);
|
||||
sprintf(to, "%s/%s", darea.Path, file.LName);
|
||||
symlink(from, to);
|
||||
|
||||
file.Deleted = TRUE;
|
||||
fseek(pFile, - sizeof(file), SEEK_CUR);
|
||||
fwrite(&file, sizeof(file), 1, pFile);
|
||||
|
@@ -119,7 +119,7 @@ int newspost(void)
|
||||
* Create newsbatch file.
|
||||
*/
|
||||
if ((CFG.newsfeed == FEEDUUCP) || (CFG.newsfeed == FEEDRNEWS)) {
|
||||
Syslog('n', "Building uncompressed batchfile");
|
||||
Syslog('m', "Building uncompressed batchfile");
|
||||
sprintf(buf, "%s/tmp/newsbatch", getenv("MBSE_ROOT"));
|
||||
if ((ofp = fopen(buf, "w+")) == NULL) {
|
||||
WriteError("$Can't create %s", buf);
|
||||
|
@@ -255,7 +255,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
||||
if ((hdr((char *)"X-PGP-Signed",msg)))
|
||||
pgpsigned = TRUE;
|
||||
if (pgpsigned)
|
||||
Syslog('n', "pgpsigned = %s", pgpsigned ? "True":"False");
|
||||
Syslog('m', "pgpsigned = %s", pgpsigned ? "True":"False");
|
||||
|
||||
q = hdr((char *)"Content-Transfer-Encoding",msg);
|
||||
if (q)
|
||||
@@ -298,14 +298,14 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
||||
removemime = TRUE;
|
||||
}
|
||||
if (removemime || qp_or_base64 || html_message)
|
||||
Syslog('n', "removemime=%s, qp_or_base64 = %d, html_message=%s", removemime ? "True":"False", qp_or_base64,
|
||||
Syslog('m', "removemime=%s, qp_or_base64 = %d, html_message=%s", removemime ? "True":"False", qp_or_base64,
|
||||
html_message ? "True":"False");
|
||||
|
||||
if ((p = hdr((char *)"Message-ID",msg))) {
|
||||
if (!removemsgid)
|
||||
removemsgid = chkftnmsgid(p);
|
||||
}
|
||||
Syslog('n', "removemsgid = %s", removemsgid ? "True":"False");
|
||||
Syslog('m', "removemsgid = %s", removemsgid ? "True":"False");
|
||||
|
||||
if ((!removeref) && (p = hdr((char *)"References",msg))) {
|
||||
p = xstrcpy(p);
|
||||
@@ -315,12 +315,12 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
||||
free(p);
|
||||
}
|
||||
if (removeref)
|
||||
Syslog('n', "removeref = %s", removeref ? "True":"False");
|
||||
Syslog('m', "removeref = %s", removeref ? "True":"False");
|
||||
|
||||
if ((p = hdr((char *)"Supersedes",msg)))
|
||||
removesupersedes = chkftnmsgid(p);
|
||||
if (removesupersedes)
|
||||
Syslog('n', "removesupersedes = %s", removesupersedes ? "True":"False");
|
||||
Syslog('m', "removesupersedes = %s", removesupersedes ? "True":"False");
|
||||
|
||||
if ((p = hdr((char *)"Approved",msg))) {
|
||||
while (*p && isspace(*p))
|
||||
@@ -333,7 +333,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
||||
*q='\n';
|
||||
}
|
||||
if (removeapproved)
|
||||
Syslog('n', "removeapproved = %s", removeapproved ? "True":"False");
|
||||
Syslog('m', "removeapproved = %s", removeapproved ? "True":"False");
|
||||
|
||||
if ((p = hdr((char *)"Reply-To",msg))) {
|
||||
removereplyto = FALSE;
|
||||
@@ -349,7 +349,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
||||
removereplyto = TRUE;
|
||||
}
|
||||
}
|
||||
Syslog('n', "removereplyto = %s", removereplyto ? "True":"False");
|
||||
Syslog('m', "removereplyto = %s", removereplyto ? "True":"False");
|
||||
|
||||
if ((p = hdr((char *)"Return-Receipt-To",msg))) {
|
||||
removereturnto = FALSE;
|
||||
@@ -367,7 +367,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
||||
}
|
||||
}
|
||||
if (!removereturnto)
|
||||
Syslog('n', "removereturnto = %s", removereturnto ? "True":"False");
|
||||
Syslog('m', "removereturnto = %s", removereturnto ? "True":"False");
|
||||
|
||||
p = ascfnode(fmsg->from,0x1f);
|
||||
i = 79-11-3-strlen(p);
|
||||
@@ -384,12 +384,12 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
||||
al long as X-FTN-Origin is used now */
|
||||
|
||||
p = ascfnode(fmsg->from,0x0f);
|
||||
Syslog('n', "checkorigin 3");
|
||||
Syslog('m', "checkorigin 3");
|
||||
i = 79-11-3-strlen(p);
|
||||
tinyorigin = TRUE;
|
||||
}
|
||||
if (tinyorigin)
|
||||
Syslog('n', "tinyorigin = %s", tinyorigin ? "True":"False");
|
||||
Syslog('m', "tinyorigin = %s", tinyorigin ? "True":"False");
|
||||
|
||||
if ((fmsg->origin) && (strlen(fmsg->origin) > i))
|
||||
fmsg->origin[i]='\0';
|
||||
@@ -403,7 +403,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
||||
if (fmsg->to)
|
||||
hdrsize += (fmsg->to->name)?strlen(fmsg->to->name):0;
|
||||
do {
|
||||
Syslog('n', "split loop, splitpart = %d", splitpart);
|
||||
Syslog('m', "split loop, splitpart = %d", splitpart);
|
||||
datasize = 0;
|
||||
|
||||
if (splitpart) {
|
||||
@@ -804,17 +804,17 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
||||
fflush(ofp);
|
||||
rewind(ofp);
|
||||
|
||||
Syslog('n', "========== Fido start");
|
||||
Syslog('m', "========== Fido start");
|
||||
while (fgets(temp, 4096, ofp) != NULL) {
|
||||
/*
|
||||
* Only log kludges, skip the body
|
||||
*/
|
||||
if ((temp[0] == '\001') || !strncmp(temp, "AREA:", 5) || !strncmp(temp, "SEEN-BY", 7)) {
|
||||
Striplf(temp);
|
||||
Syslogp('n', printable(temp, 0));
|
||||
Syslogp('m', printable(temp, 0));
|
||||
}
|
||||
}
|
||||
Syslog('n', "========== Fido end");
|
||||
Syslog('m', "========== Fido end");
|
||||
|
||||
if (newsmode)
|
||||
rc = postecho(NULL, fmsg->from, fmsg->to, origin, fmsg->subj, fmsg->date, fmsg->flags, 0, ofp, FALSE);
|
||||
|
@@ -179,7 +179,7 @@ static int StartChild(int fd, char *path, char *argv[])
|
||||
WriteError("$Cant fork %s -- spooling", path);
|
||||
return -1;
|
||||
}
|
||||
Syslog('n', "Cant fork %s -- waiting", path);
|
||||
Syslog('m', "Cant fork %s -- waiting", path);
|
||||
(void)sleep(60);
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ static int StartChild(int fd, char *path, char *argv[])
|
||||
(void)close(pan[PIPE_WRITE]);
|
||||
}
|
||||
|
||||
Syslog('n', "execv %s %s", MBSE_SS(path), MBSE_SS(argv[1]));
|
||||
Syslog('m', "execv %s %s", MBSE_SS(path), MBSE_SS(argv[1]));
|
||||
(void)execv(path, argv);
|
||||
WriteError("$Cant execv %s", path);
|
||||
_exit(MBERR_EXEC_FAILED);
|
||||
@@ -519,7 +519,7 @@ static int UnpackOne(int *fdp, int *countp)
|
||||
return FALSE;
|
||||
|
||||
if (strcmp(buff, "#! cunbatch") == 0) {
|
||||
Syslog('n', "Compressed newsbatch");
|
||||
Syslog('m', "Compressed newsbatch");
|
||||
if (SawCunbatch) {
|
||||
WriteError("Nested_cunbatch");
|
||||
return FALSE;
|
||||
@@ -592,7 +592,7 @@ void ProcessOne(FILE *fp)
|
||||
strtok(buf, " ");
|
||||
while ((group = strtok(NULL, ",\n"))) {
|
||||
if (SearchMsgsNews(group)) {
|
||||
Syslog('n', "Add group %s (%s)", msgs.Newsgroup, msgs.Tag);
|
||||
Syslog('m', "Add group %s (%s)", msgs.Newsgroup, msgs.Tag);
|
||||
groups[nrofgroups] = xstrcpy(group);
|
||||
nrofgroups++;
|
||||
} else {
|
||||
@@ -606,7 +606,7 @@ void ProcessOne(FILE *fp)
|
||||
*/
|
||||
mbuf = xstrcpy(buf+13);
|
||||
mbuf[strlen(mbuf)-2] = '\0';
|
||||
Syslog('n', "Message ID \"%s\"", printable(mbuf, 0));
|
||||
Syslog('m', "Message ID \"%s\"", printable(mbuf, 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -617,7 +617,7 @@ void ProcessOne(FILE *fp)
|
||||
} else {
|
||||
IsDoing("Article %d", (news_in + 1));
|
||||
for (i = 0; i < nrofgroups; i++) {
|
||||
Syslog('n', "Process %s", groups[i]);
|
||||
Syslog('m', "Process %s", groups[i]);
|
||||
p = xstrcpy(mbuf);
|
||||
p = xstrcat(p, groups[i]);
|
||||
crc = str_crc32(p);
|
||||
|
@@ -111,7 +111,7 @@ void fill_artlist(List **fdp, char *id, long nr, int dupe)
|
||||
{
|
||||
List **tmp;
|
||||
|
||||
Syslog('N', "Fill %s %ld %s", id, nr, dupe ? "Dupe":"New msg");
|
||||
Syslog('M', "Fill %s %ld %s", id, nr, dupe ? "Dupe":"New msg");
|
||||
|
||||
for (tmp = fdp; *tmp; tmp = &((*tmp)->next));
|
||||
*tmp = (List *)malloc(sizeof(List));
|
||||
@@ -217,7 +217,7 @@ void ScanNews(void)
|
||||
Syslog('+', "Detected upsalarm semafore, aborting newsscan");
|
||||
break;
|
||||
}
|
||||
Syslog('n', "Scan newsgroup: %s", Msgs.Newsgroup);
|
||||
Syslog('m', "Scan newsgroup: %s", Msgs.Newsgroup);
|
||||
if (!do_quiet) {
|
||||
colour(3, 0);
|
||||
printf("\r%-40s", Msgs.Newsgroup);
|
||||
@@ -257,7 +257,7 @@ int do_one_group(List **art, char *grpname, char *ftntag, int maxarticles)
|
||||
int retval, fetched = 0;
|
||||
long total, start, end;
|
||||
|
||||
Syslog('N', "do_one_group(%s, %s)", grpname, ftntag);
|
||||
Syslog('M', "do_one_group(%s, %s)", grpname, ftntag);
|
||||
IsDoing((char *)"Scan %s", grpname);
|
||||
sprintf(temp, "GROUP %s\r\n", grpname);
|
||||
nntp_send(temp);
|
||||
@@ -275,14 +275,14 @@ int do_one_group(List **art, char *grpname, char *ftntag, int maxarticles)
|
||||
total = atol(strtok(NULL, " "));
|
||||
start = atol(strtok(NULL, " "));
|
||||
end = atol(strtok(NULL, " '\0'"));
|
||||
Syslog('n', "GROUP total %d, start %d, end %d, max %d", total, start, end, maxarticles);
|
||||
Syslog('m', "GROUP total %d, start %d, end %d, max %d", total, start, end, maxarticles);
|
||||
if ((maxarticles) && (total > maxarticles)) {
|
||||
start = end - maxarticles;
|
||||
total = maxarticles;
|
||||
Syslog('n', "NEW: total %d, start %d, end %d", total, start, end);
|
||||
Syslog('m', "NEW: total %d, start %d, end %d", total, start, end);
|
||||
}
|
||||
if (!total) {
|
||||
Syslog('N', "No articles");
|
||||
Syslog('M', "No articles");
|
||||
return RETVAL_NOARTICLES;
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ int get_article(char *msgid, char *ftntag)
|
||||
FILE *fp = NULL, *dp;
|
||||
char dpath[PATH_MAX];
|
||||
|
||||
Syslog('n', "Get article %s, %s", msgid, ftntag);
|
||||
Syslog('m', "Get article %s, %s", msgid, ftntag);
|
||||
if (!SearchMsgs(ftntag)) {
|
||||
WriteError("Search message area %s failed", ftntag);
|
||||
return RETVAL_ERROR;
|
||||
@@ -392,7 +392,7 @@ int get_xover(char *grpname, long startnr, long endnr, List **art)
|
||||
WriteError("Permission denied");
|
||||
return RETVAL_NOXOVER;
|
||||
case 420:
|
||||
Syslog('n', "No articles in group %s", grpname);
|
||||
Syslog('m', "No articles in group %s", grpname);
|
||||
return RETVAL_OK;
|
||||
}
|
||||
}
|
||||
@@ -470,7 +470,7 @@ int get_xoverview(void)
|
||||
char *resp;
|
||||
POverview tmp, curptr = NULL;
|
||||
|
||||
Syslog('n', "Getting overview format list");
|
||||
Syslog('m', "Getting overview format list");
|
||||
if ((retval = nntp_cmd((char *)"LIST overview.fmt\r\n", 215)) == 0) {
|
||||
while (done == FALSE) {
|
||||
resp = nntp_receive();
|
||||
@@ -512,10 +512,10 @@ int get_xoverview(void)
|
||||
}
|
||||
|
||||
if ((tmp = xoverview) != NULL) {
|
||||
Syslog('N', "--Xoverview.fmt list");
|
||||
Syslog('M', "--Xoverview.fmt list");
|
||||
while (tmp != NULL) {
|
||||
if (tmp->header != NULL) {
|
||||
Syslog('N', "item = %s -- full = %s", tmp->header, tmp->full ? "True":"False");
|
||||
Syslog('M', "item = %s -- full = %s", tmp->header, tmp->full ? "True":"False");
|
||||
}
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
Reference in New Issue
Block a user