From 3e5a1673793631ea5cf0371e9ef5360b5e525335 Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Fri, 5 May 2017 12:55:49 +0200 Subject: [PATCH] lib-lda: Renamed smtp-client to smtp-submit (1/2). Renamed the files. --- src/lib-lda/Makefile.am | 14 +++++++------- src/lib-lda/mail-send.c | 2 +- src/lib-lda/smtp-client.h | 19 +------------------ src/lib-lda/{smtp-client.c => smtp-submit.c} | 2 +- src/lib-lda/smtp-submit.h | 18 ++++++++++++++++++ ...{test-smtp-client.c => test-smtp-submit.c} | 2 +- 6 files changed, 29 insertions(+), 28 deletions(-) rename src/lib-lda/{smtp-client.c => smtp-submit.c} (99%) create mode 100644 src/lib-lda/smtp-submit.h rename src/lib-lda/{test-smtp-client.c => test-smtp-submit.c} (99%) diff --git a/src/lib-lda/Makefile.am b/src/lib-lda/Makefile.am index 54cad69036..3a298e870d 100644 --- a/src/lib-lda/Makefile.am +++ b/src/lib-lda/Makefile.am @@ -19,14 +19,14 @@ liblda_la_SOURCES = \ lda-settings.c \ mail-deliver.c \ mail-send.c \ - smtp-client.c + smtp-submit.c headers = \ duplicate.h \ lda-settings.h \ mail-deliver.h \ mail-send.h \ - smtp-client.h + smtp-submit.h pkginc_libdir=$(pkgincludedir) pkginc_lib_HEADERS = $(headers) @@ -42,7 +42,7 @@ libdovecot_lda_la_LDFLAGS = -export-dynamic test_programs = test_nocheck_programs = \ - test-smtp-client + test-smtp-submit noinst_PROGRAMS = $(test_programs) $(test_nocheck_programs) @@ -71,10 +71,10 @@ test_deps = \ ../lib-test/libtest.la \ ../lib/liblib.la -test_smtp_client_SOURCES = test-smtp-client.c -test_smtp_client_LDFLAGS = -export-dynamic -test_smtp_client_LDADD = $(test_libs) -test_smtp_client_DEPENDENCIES = $(test_deps) +test_smtp_submit_SOURCES = test-smtp-submit.c +test_smtp_submit_LDFLAGS = -export-dynamic +test_smtp_submit_LDADD = $(test_libs) +test_smtp_submit_DEPENDENCIES = $(test_deps) check: check-am check-test check-test: all-am diff --git a/src/lib-lda/mail-send.c b/src/lib-lda/mail-send.c index c0622097a7..9753c78ee5 100644 --- a/src/lib-lda/mail-send.c +++ b/src/lib-lda/mail-send.c @@ -15,7 +15,7 @@ #include "mail-storage-settings.h" #include "lda-settings.h" #include "mail-deliver.h" -#include "smtp-client.h" +#include "smtp-submit.h" #include "mail-send.h" #include diff --git a/src/lib-lda/smtp-client.h b/src/lib-lda/smtp-client.h index 585bb2276c..2f40c075d1 100644 --- a/src/lib-lda/smtp-client.h +++ b/src/lib-lda/smtp-client.h @@ -1,18 +1 @@ -#ifndef SMTP_CLIENT_H -#define SMTP_CLIENT_H - -struct smtp_client * ATTR_NULL(3) -smtp_client_init(const struct lda_settings *set, const char *return_path); -/* Add a new recipient */ -void smtp_client_add_rcpt(struct smtp_client *client, const char *address); -/* Get an output stream where the message can be written to. The recipients - must already be added before calling this. */ -struct ostream *smtp_client_send(struct smtp_client *client); -void smtp_client_abort(struct smtp_client **client); -/* Returns 1 on success, 0 on permanent failure (e.g. invalid destination), - -1 on temporary failure. */ -int smtp_client_deinit(struct smtp_client *client, const char **error_r); -/* Same as smtp_client_deinit(), but timeout after given number of seconds. */ -int smtp_client_deinit_timeout(struct smtp_client *client, - unsigned int timeout_secs, const char **error_r); -#endif +#include "smtp-submit.h" diff --git a/src/lib-lda/smtp-client.c b/src/lib-lda/smtp-submit.c similarity index 99% rename from src/lib-lda/smtp-client.c rename to src/lib-lda/smtp-submit.c index b1e83f3629..538fe2ee02 100644 --- a/src/lib-lda/smtp-client.c +++ b/src/lib-lda/smtp-submit.c @@ -12,7 +12,7 @@ #include "lda-settings.h" #include "mail-deliver.h" #include "program-client.h" -#include "smtp-client.h" +#include "smtp-submit.h" #include #include diff --git a/src/lib-lda/smtp-submit.h b/src/lib-lda/smtp-submit.h new file mode 100644 index 0000000000..585bb2276c --- /dev/null +++ b/src/lib-lda/smtp-submit.h @@ -0,0 +1,18 @@ +#ifndef SMTP_CLIENT_H +#define SMTP_CLIENT_H + +struct smtp_client * ATTR_NULL(3) +smtp_client_init(const struct lda_settings *set, const char *return_path); +/* Add a new recipient */ +void smtp_client_add_rcpt(struct smtp_client *client, const char *address); +/* Get an output stream where the message can be written to. The recipients + must already be added before calling this. */ +struct ostream *smtp_client_send(struct smtp_client *client); +void smtp_client_abort(struct smtp_client **client); +/* Returns 1 on success, 0 on permanent failure (e.g. invalid destination), + -1 on temporary failure. */ +int smtp_client_deinit(struct smtp_client *client, const char **error_r); +/* Same as smtp_client_deinit(), but timeout after given number of seconds. */ +int smtp_client_deinit_timeout(struct smtp_client *client, + unsigned int timeout_secs, const char **error_r); +#endif diff --git a/src/lib-lda/test-smtp-client.c b/src/lib-lda/test-smtp-submit.c similarity index 99% rename from src/lib-lda/test-smtp-client.c rename to src/lib-lda/test-smtp-submit.c index bb8f176bda..46c93a8ae9 100644 --- a/src/lib-lda/test-smtp-client.c +++ b/src/lib-lda/test-smtp-submit.c @@ -16,7 +16,7 @@ #include "istream-dot.h" #include "test-common.h" #include "lda-settings.h" -#include "smtp-client.h" +#include "smtp-submit.h" #include #include -- 2.47.3