attempt at a fix for the bridge

This commit is contained in:
Andrew Pamment 2018-05-24 19:01:24 +10:00
parent f5193b6616
commit 7e4d112014

View File

@ -485,11 +485,8 @@ int import(char *filename) {
for (i=strlen(body) -2; i > 0; i--) { for (i=strlen(body) -2; i > 0; i--) {
if (body[i] == '(') { if (body[i] == '\r') {
sprintf(&body[i], "(%s)\r", fido_addr); sprintf(buffer, "\r---\r * Origin: mnet->ftn (%s)", fido_addr);
break;
} if (body[i] == '\r') {
sprintf(buffer, "\r---\r * Origin: Origin Line Missing... (%s)", fido_addr);
body = realloc(body, strlen(body) + strlen(buffer) + 1); body = realloc(body, strlen(body) + strlen(buffer) + 1);
strcat(body, buffer); strcat(body, buffer);
} }
@ -499,7 +496,7 @@ int import(char *filename) {
JAM_ClearMsgHeader(&jmh); JAM_ClearMsgHeader(&jmh);
jmh.DateWritten = msg.timedate; jmh.DateWritten = msg.timedate;
jmh.Attribute |= JAM_MSG_TYPEECHO; jmh.Attribute |= JAM_MSG_TYPEECHO;
jmh.Attribute |= JAM_MSG_TYPELOCAL; jmh.Attribute |= JAM_MSG_LOCAL;
jsp = JAM_NewSubPacket(); jsp = JAM_NewSubPacket();
@ -535,15 +532,6 @@ int import(char *filename) {
jsf.Buffer = buffer; jsf.Buffer = buffer;
JAM_PutSubfield(jsp, &jsf); JAM_PutSubfield(jsp, &jsf);
if (strlen(msg.reply)> 0) {
jsf.LoID = JAMSFLD_REPLYID;
jsf.HiID = 0;
jsf.DatLen = strlen(msg.reply);
jsf.Buffer = msg.reply;
JAM_PutSubfield(jsp, &jsf);
jmh.ReplyCRC = JAM_Crc32(msg.reply, strlen(msg.reply));
}
jb = open_jam_base(areas[areaid]->basedir); jb = open_jam_base(areas[areaid]->basedir);
if (!jb) { if (!jb) {
return 0; return 0;