Problem with etime in smtpmail.p

For the past few days, I have been receiving blank emails from our ERP system. We have several places where the system mails strange things so sending mail is not uncommon. Blank emails are, though. I managed to trace the mails back to the specific server and checked the logfiles of smtpmail, but found nothing. Luckily, the program that called smtpmail.p itself also did some logging and captured this error:

Code:
11:20:32 Value 3356571535 too large to fit in INTEGER. Line 1248 in WriteData alg\smtpmail-pkf.p. (15747)
11:20:32 ** Unable to update  Field. (142)

Inside smtpmail.p in "WriteData" I found the perpetrator:

1742818095088.png

Since var start-Etime is defined as a regular INTEGER, it will overflow after about 24 days, which happened in my case.
I now changed it to INT64 so it will buy me some time; roughly almost 300 million years, so that ought to be enough.
I mean, I don't expect an uptime of more than 292 million years.
 
Last edited:
So you are admitting to not using CABL on your codebase? ;) (my version was updated to int64 in 2015)
 
This is a coincidence as we have just encountered a problem in the "WriteData" procedure in smtpmail where the email server seemed to temporary glitch or connection was lost whilst a write was taking place which seemed to cause the whole lot getting stuck in a loop. Added the parts highlighted in red to cope with this in the future:

1742825857023.png
 
Back
Top