[balsa/oauth2-support] fix build errors w/o oauth2 support



commit 8ad412cb4b488c2af13efb9c8f6603b21a2ef2d1
Author: Albrecht Dreß <albrecht dress netcologne de>
Date:   Mon Jun 14 19:10:47 2021 +0200

    fix build errors w/o oauth2 support
    
    Signed-off-by: Albrecht Dreß <albrecht dress netcologne de>

 libbalsa/server.c              | 6 ++++--
 libnetclient/net-client-pop.c  | 2 +-
 libnetclient/net-client-smtp.c | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/libbalsa/server.c b/libbalsa/server.c
index 7c8632a13..a5710c887 100644
--- a/libbalsa/server.c
+++ b/libbalsa/server.c
@@ -576,7 +576,6 @@ libbalsa_server_get_auth(NetClient         *client,
     LibBalsaServer *server = LIBBALSA_SERVER(user_data);
     LibBalsaServerPrivate *priv = libbalsa_server_get_instance_private(server);
     gchar **result = NULL;
-    GError *error = NULL;
 
     g_debug("%s: %p %d %p: encrypted = %d", __func__, client, mode, user_data, 
net_client_is_encrypted(client));
     if (priv->auth_mode != NET_CLIENT_AUTH_NONE_ANON) {
@@ -593,7 +592,9 @@ libbalsa_server_get_auth(NetClient         *client,
         case NET_CLIENT_AUTH_KERBEROS:
                break;                  /* only user name required */
 #if defined(HAVE_OAUTH2)
-        case NET_CLIENT_AUTH_OAUTH2:
+        case NET_CLIENT_AUTH_OAUTH2: {
+               GError *error = NULL;
+
                if (priv->oauth == NULL) {
                        priv->oauth = libbalsa_oauth2_new(server, &error);
                }
@@ -606,6 +607,7 @@ libbalsa_server_get_auth(NetClient         *client,
                        g_clear_error(&error);
                }
                break;
+        }
 #endif /* defined(HAVE_OAUTH2) */
         default:
                g_assert_not_reached();
diff --git a/libnetclient/net-client-pop.c b/libnetclient/net-client-pop.c
index 2cff3f8a7..2e4147f64 100644
--- a/libnetclient/net-client-pop.c
+++ b/libnetclient/net-client-pop.c
@@ -910,7 +910,7 @@ net_client_pop_auth_oauth2(NetClientPop *client, const gchar *user, const gchar
 
 static gboolean
 net_client_pop_auth_oauth2(NetClientPop G_GNUC_UNUSED *client, const gchar G_GNUC_UNUSED *user,
-       const gchar G_GNUC_UNUSED *access_token, GError G_GNUC_UNUSED **error)
+       const gchar G_GNUC_UNUSED *access_token, gboolean G_GNUC_UNUSED oauthbearer, GError G_GNUC_UNUSED 
**error)
 {
        g_assert_not_reached();                 /* this should never happen! */
        return FALSE;                                   /* never reached, make gcc happy */
diff --git a/libnetclient/net-client-smtp.c b/libnetclient/net-client-smtp.c
index 8b8494ed3..e25797fd8 100644
--- a/libnetclient/net-client-smtp.c
+++ b/libnetclient/net-client-smtp.c
@@ -740,7 +740,7 @@ net_client_smtp_auth_oauth2(NetClientSmtp *client, const gchar *user, const gcha
 /*lint -e{715,818} */
 static gboolean
 net_client_smtp_auth_oauth2(NetClientSmtp G_GNUC_UNUSED *client, const gchar G_GNUC_UNUSED *user,
-       const gchar G_GNUC_UNUSED *access_token, GError G_GNUC_UNUSED **error)
+       const gchar G_GNUC_UNUSED *access_token, gboolean G_GNUC_UNUSED oauthbearer, GError G_GNUC_UNUSED 
**error)
 {
        g_assert_not_reached();                 /* this should never happen! */
        return FALSE;                                   /* never reached, make gcc happy */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]