build: use pkg-config for i18n
[exim.git] / src / src / xclient.c
index 2a8be9b0e7dd04d6ad5b2267682a2da2d7e8cf39..af7a94b2d83de62855f281dd06020a1b4138ddf2 100644 (file)
@@ -2,7 +2,7 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) The Exim Maintainers 2023 */
+/* Copyright (c) The Exim Maintainers 2023 - 2024 */
 /* See the file NOTICE for conditions of use and distribution. */
 /* SPDX-License-Identifier: GPL-2.0-or-later */
 
 /* See the file NOTICE for conditions of use and distribution. */
 /* SPDX-License-Identifier: GPL-2.0-or-later */
 
@@ -10,7 +10,9 @@
 
 #ifdef EXPERIMENTAL_XCLIENT
 
 
 #ifdef EXPERIMENTAL_XCLIENT
 
-/* From https://www.postfix.org/XCLIENT_README.html I infer two generations of
+/* This is a proxy protocol.
+
+From https://www.postfix.org/XCLIENT_README.html I infer two generations of
 protocol.  The more recent one obviates the utility of the HELO attribute, since
 it mandates the proxy always sending a HELO/EHLO smtp command following (a
 successful) XCLIENT command, and that will carry a NELO name (which we assume,
 protocol.  The more recent one obviates the utility of the HELO attribute, since
 it mandates the proxy always sending a HELO/EHLO smtp command following (a
 successful) XCLIENT command, and that will carry a NELO name (which we assume,
@@ -66,7 +68,7 @@ Returns:      the number of bytes in the result, excluding the final zero;
 static int
 xclient_xtextdecode(uschar * code, uschar * end, uschar ** ptr)
 {
 static int
 xclient_xtextdecode(uschar * code, uschar * end, uschar ** ptr)
 {
-return auth_xtextdecode(string_copyn(code, end-code), ptr);
+return xtextdecode(string_copyn(code, end-code), ptr);
 }
 
 /*************************************************
 }
 
 /*************************************************
@@ -172,7 +174,7 @@ for (state = XCLIENT_SKIP_SPACES; *s; )
       uschar * val;
 
       word = ++s;                      /* skip the = */
       uschar * val;
 
       word = ++s;                      /* skip the = */
-      while (*s && !isspace(*s)) s++;
+      Uskip_nonwhite(&s);
       len = s - word;
 
       DEBUG(D_transport) debug_printf(" XCLIENT: \tvalue %.*s\n", len, word);
       len = s - word;
 
       DEBUG(D_transport) debug_printf(" XCLIENT: \tvalue %.*s\n", len, word);
@@ -248,7 +250,7 @@ for (state = XCLIENT_SKIP_SPACES; *s; )
       }
 
     case XCLIENT_SKIP_SPACES:
       }
 
     case XCLIENT_SKIP_SPACES:
-      while (*s && isspace (*s)) s++;
+      Uskip_whitespace(&s);
       state = XCLIENT_READ_COMMAND;
       break;
 
       state = XCLIENT_READ_COMMAND;
       break;