[exim-cvs] Debug: use difftime()

Góra strony
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
Dla: exim-cvs
Temat: [exim-cvs] Debug: use difftime()
Gitweb: https://git.exim.org/exim.git/commitdiff/9ae8613607b12257e1fe59c603119bc5d4cd3474
Commit:     9ae8613607b12257e1fe59c603119bc5d4cd3474
Parent:     5e0ccec4397bd2d21cc1473681a62e7c2fb6afbe
Author:     Daniel Golle <daniel@???>
AuthorDate: Fri Apr 5 00:39:56 2024 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Fri Apr 5 00:39:56 2024 +0100


    Debug: use difftime()
---
 src/src/transports/smtp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index a5f99edaa..ddd6ad7e1 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -945,7 +945,8 @@ if (  sx->early_pipe_active
     if (!(er = dbfn_read_enforce_length(dbm_file, ehlo_resp_key, sizeof(dbdata_ehlo_resp))))
       debug_printf("no ehlo-resp record!\n");
     else
-      debug_printf("ehlo-resp record is %d seconds old\n", time(NULL) - er->time_stamp);
+      debug_printf("ehlo-resp record is %.0f seconds old\n",
+            difftime(time(NULL), er->time_stamp));
     }


dbfn_delete(dbm_file, ehlo_resp_key);

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/