uplink requests sender name is now sysop's name

This commit is contained in:
Michiel Broek 2002-04-27 11:38:59 +00:00
parent 830fc26f5c
commit ba68cdad83
3 changed files with 8 additions and 8 deletions

View File

@ -4726,6 +4726,8 @@ v0.33.20 10-Feb-2002
Auto file area create implemented, it can use plain tagfiles Auto file area create implemented, it can use plain tagfiles
or filegate.zxx formatted files. or filegate.zxx formatted files.
The mbfido web command now uses macro templates. The mbfido web command now uses macro templates.
Areamgr uplink requests the sender name is now set to the
sysop's name, so he/she will get to read the responses.
mbfile: mbfile:
The mbfile index command now creates the html pages using the The mbfile index command now creates the html pages using the

View File

@ -199,11 +199,12 @@ void Cookie(void)
char *fname; char *fname;
long recno, records; long recno, records;
MacroVars("F", "s", "");
fname = calloc(PATH_MAX, sizeof(char)); fname = calloc(PATH_MAX, sizeof(char));
sprintf(fname, "%s/etc/oneline.data", getenv("MBSE_ROOT")); sprintf(fname, "%s/etc/oneline.data", getenv("MBSE_ROOT"));
if ((olf = fopen(fname, "r")) == NULL) { if ((olf = fopen(fname, "r")) == NULL) {
WriteError("$Can't open %s", fname); WriteError("Can't open %s", fname);
free(fname); free(fname);
return; return;
} }
@ -222,10 +223,10 @@ void Cookie(void)
if (fread(&ol, olhdr.recsize, 1, olf) == 1) { if (fread(&ol, olhdr.recsize, 1, olf) == 1) {
MacroVars("F", "s", ol.Oneline); MacroVars("F", "s", ol.Oneline);
} else { } else {
WriteError("Can't read %s", fname); WriteError("Can't read record %d from %s", recno, fname);
} }
} else { } else {
WriteError("$Can't seek record %d in %s", recno, fname); WriteError("Can't seek record %d in %s", recno, fname);
} }
fclose(olf); fclose(olf);
free(fname); free(fname);

View File

@ -295,7 +295,7 @@ int UplinkRequest(faddr *t, int FileMgr, char *cmd)
fidoaddr Orig, Dest; fidoaddr Orig, Dest;
faddr From; faddr From;
unsigned flags = M_PVT; unsigned flags = M_PVT;
char ext[4], *mgrname, *bymgr, *subj; char ext[4], *mgrname, *subj;
int i; int i;
From = *bestaka_s(t); From = *bestaka_s(t);
@ -324,14 +324,12 @@ int UplinkRequest(faddr *t, int FileMgr, char *cmd)
return 2; return 2;
} }
mgrname = xstrcpy(nodes.UplFmgrPgm); mgrname = xstrcpy(nodes.UplFmgrPgm);
bymgr = xstrcpy((char *)"FileMgr");
} else { } else {
if (strlen(nodes.UplAmgrPgm) == 0) { if (strlen(nodes.UplAmgrPgm) == 0) {
Syslog('!', "AreaMgr program not defined in setup of node %s", aka2str(Dest)); Syslog('!', "AreaMgr program not defined in setup of node %s", aka2str(Dest));
return 2; return 2;
} }
mgrname = xstrcpy(nodes.UplAmgrPgm); mgrname = xstrcpy(nodes.UplAmgrPgm);
bymgr = xstrcpy((char *)"AreaMgr");
} }
if (strlen(nodes.Apasswd) == 0) { if (strlen(nodes.Apasswd) == 0) {
@ -366,7 +364,7 @@ int UplinkRequest(faddr *t, int FileMgr, char *cmd)
if ((qp = OpenPkt(Orig, Dest, (char *)ext)) == NULL) if ((qp = OpenPkt(Orig, Dest, (char *)ext)) == NULL)
return 4; return 4;
if (AddMsgHdr(qp, &From, t, flags, 0, Now, mgrname, bymgr, subj)) { if (AddMsgHdr(qp, &From, t, flags, 0, Now, mgrname, CFG.sysop_name, subj)) {
fclose(qp); fclose(qp);
return 4; return 4;
} }
@ -399,7 +397,6 @@ int UplinkRequest(faddr *t, int FileMgr, char *cmd)
fclose(qp); fclose(qp);
free(mgrname); free(mgrname);
free(bymgr);
free(subj); free(subj);
net_out++; net_out++;
return 0; return 0;