Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 297159 Details for
Bug 396265
dev-lang/php-5.3.8 should write timestamps to mail.log
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
patch (oryginally written for php-5.3.2)
php_add_timestamp_to_mail.log.patch (text/plain), 1.04 KB, created by
Sergey S. Starikoff
on 2011-12-28 07:36:40 UTC
(
hide
)
Description:
patch (oryginally written for php-5.3.2)
Filename:
MIME Type:
Creator:
Sergey S. Starikoff
Created:
2011-12-28 07:36:40 UTC
Size:
1.04 KB
patch
obsolete
>--- ./ext/standard/mail.c.orig 2010-02-04 16:19:32.000000000 -0800 >+++ ./ext/standard/mail.c 2010-06-19 11:08:32.000000000 -0700 >@@ -21,6 +21,7 @@ > #include <stdlib.h> > #include <ctype.h> > #include <stdio.h> >+#include <time.h> > #include "php.h" > #include "ext/standard/info.h" > #include "ext/standard/php_string.h" >@@ -217,7 +218,12 @@ > > if (mail_log) { > char *tmp; >- int l = spprintf(&tmp, 0, "mail() on [%s:%d]: To: %s -- Headers: %s\n", zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C), to, hdr ? hdr : ""); >+ time_t tm; >+ char buf[26]; >+ tm = time(NULL); >+ ctime_r(&tm, buf); >+ buf[20] = '\0'; >+ int l = spprintf(&tmp, 0, "%smail() on [%s:%d]: To: %s -- Headers: %s\n", buf, zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C), to, hdr ? hdr : ""); > php_stream *stream = php_stream_open_wrapper(mail_log, "a", IGNORE_URL_WIN | REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR, NULL); > > if (hdr) { /* find all \r\n instances and replace them with spaces, so a log line is always one line long */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 396265
: 297159