Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 43626 Details for
Bug 70623
Improved fcron mail output
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to job.c
fcron_job.c.patch (text/plain), 1.37 KB, created by
Rob Kruus
on 2004-11-09 16:54:08 UTC
(
hide
)
Description:
patch to job.c
Filename:
MIME Type:
Creator:
Rob Kruus
Created:
2004-11-09 16:54:08 UTC
Size:
1.37 KB
patch
obsolete
>--- job.c.orig 2004-11-05 15:00:59.860115256 -0500 >+++ job.c 2004-11-06 20:44:32.771248736 -0500 >@@ -199,7 +199,10 @@ > /* is this a complete mail address ? (ie. with a "@", not only a username) */ > char complete_adr = 0; > int i; >- >+ /*used in the Date line */ >+ time_t t = time(NULL); >+ char time_str[255]; >+ > if ( mailf == NULL ) > die_e("Could not fdopen() mailfd"); > >@@ -219,24 +222,24 @@ > for ( i = 0 ; line->cl_mailto[i] != '\0' ; i++ ) { > if ( line->cl_mailto[i] == '@' ) { > complete_adr = 1; >+ fprintf(mailf, "\nFrom: Cron Daemon <%s>, line->cl_mailto"); > break; > } > } > if ( ! complete_adr ) > fprintf(mailf, "@%s", hostname); >- } >+ fprintf(mailf, "\nFrom: Cron Daemon <%s@%s>",line->cl_mailto, hostname); >+ } > #else > hostname[0] = '\0'; > #endif /* HAVE_GETHOSTNAME */ > >- if (subject) >- fprintf(mailf, "\nSubject: fcron <%s@%s> %s: %s\n\n", line->cl_file->cf_user, >- ( hostname[0] != '\0')? hostname:"?" , subject, line->cl_shell); >- else >- fprintf(mailf, "\nSubject: fcron <%s@%s> %s\n\n", line->cl_file->cf_user, >- ( hostname[0] != '\0')? hostname:"?" , line->cl_shell); >- >- >+ fprintf(mailf, "\nSubject: %s", line->cl_shell); >+ >+ /*create an rfc-2822 compliant Date line*/ >+ strftime(time_str, sizeof(time_str), "%a, %d %b %Y %H:%M:%S %z", localtime(&t)); >+ fprintf(mailf, "\nDate: %s\n\n", time_str); >+ > return mailf; > } >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 70623
:
43626
|
43628
|
43629