From 228e6c443ccb20263ab17ea600b0322a1afe6849 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 15 Jan 2001 16:58:58 +0000 Subject: [PATCH] queue_command() and queue_posting() will now return the cookie used as filename, so that the calling code can mail back the request for confirmation. --- petidomo.h | 4 ++-- queue_command.c | 3 ++- queue_posting.c | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/petidomo.h b/petidomo.h index 9f7e542..0b5d6e0 100644 --- a/petidomo.h +++ b/petidomo.h @@ -236,10 +236,10 @@ char* generate_cookie(const char*); /********** queue_posting.c **********/ -void queue_posting(const struct Mail* mail, const char* listname); +char* queue_posting(const struct Mail* mail, const char* listname); /********** queue_command.c **********/ -void queue_command(const struct Mail* mail, const char* command); +char* queue_command(const struct Mail* mail, const char* command); #endif /* !defined(__PETIDOMO_H__) */ diff --git a/queue_command.c b/queue_command.c index b727104..0db76c8 100644 --- a/queue_command.c +++ b/queue_command.c @@ -22,7 +22,7 @@ #include "libtext/text.h" #include "petidomo.h" -void queue_command(const struct Mail* mail, const char* command) +char* queue_command(const struct Mail* mail, const char* command) { const struct PD_Config * MasterConfig = getMasterConfig(); char* buffer; @@ -54,4 +54,5 @@ void queue_command(const struct Mail* mail, const char* command) fclose(fh); chmod(buffer, 0755); free(buffer); + return cookie; } diff --git a/queue_posting.c b/queue_posting.c index bf15ff1..136bc35 100644 --- a/queue_posting.c +++ b/queue_posting.c @@ -22,7 +22,7 @@ #include "libtext/text.h" #include "petidomo.h" -void queue_posting(const struct Mail* mail, const char* listname) +char* queue_posting(const struct Mail* mail, const char* listname) { const struct PD_Config * MasterConfig = getMasterConfig(); char* buffer; @@ -46,4 +46,5 @@ void queue_posting(const struct Mail* mail, const char* listname) fclose(fh); chmod(buffer, 0755); free(buffer); + return cookie; }