]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-pop3: Add definition for default service TCP ports.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 1 Nov 2021 00:40:18 +0000 (01:40 +0100)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 17 Jan 2022 11:52:10 +0000 (13:52 +0200)
src/config/Makefile.am
src/config/settings-get.pl
src/lib-pop3/Makefile.am
src/lib-pop3/pop3-protocol.h [new file with mode: 0644]
src/pop3-login/client.c
src/pop3-login/pop3-login-settings.c

index 084ec0ed98f6832f8dd4bc27a41b4921214de778..fb155df770fc14f3ae6e547670b45187525ae54b 100644 (file)
@@ -12,6 +12,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/lib-mail \
        -I$(top_srcdir)/src/lib-settings \
        -I$(top_srcdir)/src/lib-master \
+       -I$(top_srcdir)/src/lib-pop3 \
        -DPKG_RUNDIR=\""$(rundir)"\" \
        -DPKG_STATEDIR=\""$(statedir)"\" \
        -DPKG_LIBEXECDIR=\""$(pkglibexecdir)"\" \
index ca124eb4ae94248f747cc50e56d26c66f9077144..5bd28ae39a6295d9f2448e3b021ec52ef4d70fa3 100755 (executable)
@@ -21,6 +21,7 @@ print '#include "unichar.h"'."\n";
 print '#include "hash-method.h"'."\n";
 print '#include "settings-parser.h"'."\n";
 print '#include "message-header-parser.h"'."\n";
+print '#include "pop3-protocol.h"'."\n";
 print '#include "all-settings.h"'."\n";
 print '#include <stddef.h>'."\n";
 print '#include <unistd.h>'."\n";
index fc62d667a7fd7f57dccdafb3cbd2685e138b9a32..cc9eaed83dd487122590924718263cb746b2b97b 100644 (file)
@@ -1,5 +1,6 @@
 headers = \
-       pop3-capability.h
+       pop3-capability.h \
+       pop3-protocol.h
 
 pkginc_libdir=$(pkgincludedir)
 pkginc_lib_HEADERS = $(headers)
diff --git a/src/lib-pop3/pop3-protocol.h b/src/lib-pop3/pop3-protocol.h
new file mode 100644 (file)
index 0000000..e6d2b70
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef POP3_PROTOCOL_H
+#define POP3_PROTOCOL_H
+
+#define POP3_DEFAULT_PORT 110
+#define POP3S_DEFAULT_PORT 995
+
+#endif
index d57d284b135e037dea055e83ca746e47b8895aae..1e7b334f890bac83e9d2766d2e7361c4f7972098 100644 (file)
@@ -12,6 +12,7 @@
 #include "str.h"
 #include "strescape.h"
 #include "master-service.h"
+#include "pop3-protocol.h"
 #include "client.h"
 #include "client-authenticate.h"
 #include "auth-client.h"
@@ -373,8 +374,8 @@ static struct client_vfuncs pop3_client_vfuncs = {
 static struct login_binary pop3_login_binary = {
        .protocol = "pop3",
        .process_name = "pop3-login",
-       .default_port = 110,
-       .default_ssl_port = 995,
+       .default_port = POP3_DEFAULT_PORT,
+       .default_ssl_port = POP3S_DEFAULT_PORT,
 
        .event_category = {
                .name = "pop3",
index 747e51e508044ecff48d90aba6043e57d6bdac5f..e81532590c0c5911cd3f2a7317f34322b7a44a55 100644 (file)
@@ -5,14 +5,16 @@
 #include "settings-parser.h"
 #include "service-settings.h"
 #include "login-settings.h"
+#include "pop3-protocol.h"
 #include "pop3-login-settings.h"
 
 #include <stddef.h>
 
 /* <settings checks> */
 static struct inet_listener_settings pop3_login_inet_listeners_array[] = {
-       { .name = "pop3", .address = "", .port = 110 },
-       { .name = "pop3s", .address = "", .port = 995, .ssl = TRUE }
+       { .name = "pop3", .address = "", .port = POP3_DEFAULT_PORT },
+       { .name = "pop3s", .address = "", .port = POP3S_DEFAULT_PORT,
+         .ssl = TRUE }
 };
 static struct inet_listener_settings *pop3_login_inet_listeners[] = {
        &pop3_login_inet_listeners_array[0],