From dea2f1da28eedfbe2c649c633ca4807e944f7033 Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Tue, 20 Jan 2004 15:02:15 +0000 Subject: [PATCH] Fixed newly introduced bug in copying/moving Opus mail --- docs/notework.txt | 2 ++ goldlib/gmb3/gmofido3.cpp | 25 +++++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/docs/notework.txt b/docs/notework.txt index 843b5ab..db7e3ea 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,8 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ +- Fixed newly introduced bug in copying/moving Opus mail. + - Fixed CRC16 routine for Synchronet fields updating. - Fixed X-Comment-To/X-To creation. diff --git a/goldlib/gmb3/gmofido3.cpp b/goldlib/gmb3/gmofido3.cpp index ab3a593..940827d 100644 --- a/goldlib/gmb3/gmofido3.cpp +++ b/goldlib/gmb3/gmofido3.cpp @@ -66,9 +66,14 @@ int FidoArea::load_message(int __mode, gmsg* __msg, FidoHdr& __hdr) { strxcpy(__msg->re, __hdr.re, 72); if(isopus()) { - __msg->orig.zone = __msg->oorig.zone = - __msg->dest.zone = __msg->odest.zone = - __msg->orig.point = __msg->oorig.point = + __msg->orig.zone = __msg->oorig.zone = 0; + __msg->orig.net = __msg->oorig.net = __hdr.orignet; + __msg->orig.node = __msg->oorig.node = __hdr.orignode; + __msg->orig.point = __msg->oorig.point = 0; + + __msg->dest.zone = __msg->odest.zone = 0; + __msg->dest.net = __msg->odest.net = __hdr.destnet; + __msg->dest.node = __msg->odest.node = __hdr.destnode; __msg->dest.point = __msg->odest.point = 0; // Convert datetime @@ -88,12 +93,16 @@ int FidoArea::load_message(int __mode, gmsg* __msg, FidoHdr& __hdr) { __msg->written = __msg->arrived = 0; } + __msg->written = __msg->written ? __msg->written : FidoTimeToUnix(__hdr.datetime); - time_t a = time(NULL); - struct tm *tp = gmtime(&a); - tp->tm_isdst = -1; - time_t b = mktime(tp); - __msg->arrived = __msg->arrived ? __msg->arrived : a + a - b; + + if(__msg->arrived == 0) { + time_t a = time(NULL); + struct tm *tp = gmtime(&a); + tp->tm_isdst = -1; + time_t b = mktime(tp); + __msg->arrived = a + a - b; + } // Transfer attributes __msg->attr.pvt(__hdr.attr & FIDO_PVT);