[evolution-data-server] Fix build with --disable-google-auth



commit 56ef93606ea09b3ef9ee4116e8ae9725ca611020
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Sat Oct 8 15:01:27 2016 -0400

    Fix build with --disable-google-auth
    
    With a recent change, GOOGLE_CLIENT_ID/SECRET were referenced even
    with Google authentication disabled. Add an ifdef to avoid this.
    (A larger section of the code is never hit with authentication
    disabled; this is a minimal change to get the build working.)

 .../e-source-credentials-provider-impl-google.c    |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libedataserver/e-source-credentials-provider-impl-google.c 
b/libedataserver/e-source-credentials-provider-impl-google.c
index 9a775b3..b3642e2 100644
--- a/libedataserver/e-source-credentials-provider-impl-google.c
+++ b/libedataserver/e-source-credentials-provider-impl-google.c
@@ -293,6 +293,7 @@ e_source_credentials_google_is_supported (void)
 static gchar *
 cpi_google_create_refresh_token_post_data (const gchar *refresh_token)
 {
+#ifdef ENABLE_GOOGLE_AUTH
        g_return_val_if_fail (refresh_token != NULL, NULL);
 
        return soup_form_encode (
@@ -301,6 +302,9 @@ cpi_google_create_refresh_token_post_data (const gchar *refresh_token)
                "client_secret", GOOGLE_CLIENT_SECRET,
                "grant_type", "refresh_token",
                NULL);
+#else
+        return NULL;
+#endif /* ENABLE_GOOGLE_AUTH */
 }
 
 static void


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