Commit da486a78 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Don't attempt to parse origin addr from origin lines in NetMail msgs

Apparently, some versions or configurations of Mystic BBS will include an
Origin Line in FTN NetMail messages. That would've been okay for SBBSecho,
except these origin lines do not contain an FTN address (in parenthesis).

So, firstly: when importing NetMail messages (subnum=INVALID_SUB), don't
attempt to parse any Origin Lines. Secondly, fix up the Origin Line parse
code a bit better detect the case when no FTN address is actually present.
parent 931675c3
Pipeline #229 passed with stage
in 19 minutes and 32 seconds
......@@ -3505,11 +3505,11 @@ int fmsgtosmsg(char* fbuf, fmsghdr_t* hdr, uint user, uint subnum)
if(cr && (!strncmp(fbuf+l,"--- ",4)
|| !strncmp(fbuf+l,"---\r",4)))
done=1; /* tear line and down go into tail */
else if(cr && !strncmp(fbuf+l," * Origin: ",11)) {
else if(cr && !strncmp(fbuf+l," * Origin: ",11) && subnum != INVALID_SUB) {
p=(char*)fbuf+l+11;
while(*p && *p!='\r') p++; /* Find CR */
while(p && *p!='(') p--; /* rewind to '(' */
if(p)
while(p >= fbuf+l && *p!='(') p--; /* rewind to '(' */
if(*p == '(')
origaddr=atofaddr(p+1); /* get orig address */
done=1;
}
......@@ -6112,7 +6112,7 @@ int main(int argc, char **argv)
memset(&smb[i],0,sizeof(smb_t));
memset(&cfg,0,sizeof(cfg));
sscanf("$Revision: 3.178 $", "%*s %s", revision);
sscanf("$Revision: 3.179 $", "%*s %s", revision);
DESCRIBE_COMPILER(compiler);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment