[evolution-data-server] Drop oauth package requirement for GOA support.



commit 79f827930d4e18a2c6ba6bf16a5a03320115bac4
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Oct 10 16:17:41 2012 -0400

    Drop oauth package requirement for GOA support.
    
    On second thought, Camel's XOAUTH SASL module is just using
    g_random_int() to generate the "oauth_nonce" parameter.
    
    Good enough, I suppose.  Do the same for EGDataGoaAuthorizer.

 .../backends/google/e-gdata-goa-authorizer.c       |    6 ++----
 configure.ac                                       |   10 ----------
 2 files changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/addressbook/backends/google/e-gdata-goa-authorizer.c b/addressbook/backends/google/e-gdata-goa-authorizer.c
index 6fb53a3..1cae150 100644
--- a/addressbook/backends/google/e-gdata-goa-authorizer.c
+++ b/addressbook/backends/google/e-gdata-goa-authorizer.c
@@ -19,7 +19,6 @@
 #include "e-gdata-goa-authorizer.h"
 
 #include <string.h>
-#include <oauth.h>
 
 #define E_GDATA_GOA_AUTHORIZER_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -110,10 +109,9 @@ gdata_goa_authorizer_get_parameters (SoupMessage *message,
 	key = (gpointer) "oauth_version";
 	g_hash_table_insert (parameters, key, g_strdup ("1.0"));
 
-	string = oauth_gen_nonce ();
 	key = (gpointer) "oauth_nonce";
-	g_hash_table_insert (parameters, key, g_strdup (string));
-	free (string);  /* do not use g_free () */
+	string = g_strdup_printf ("%u", g_random_int ());
+	g_hash_table_insert (parameters, key, string); /* takes ownership */
 
 	key = (gpointer) "oauth_timestamp";
 	string = g_strdup_printf ("%" G_GINT64_FORMAT, (gint64) time (NULL));
diff --git a/configure.ac b/configure.ac
index 64d6062..99a9b67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,6 @@ m4_define([libsecret_minimum_version], [0.5])
 m4_define([libxml_minimum_version], [2.0.0])		dnl XXX Just a Guess
 m4_define([libsoup_minimum_version], [2.38.1])
 m4_define([libgdata_minimum_version], [0.10])
-m4_define([oauth_minimum_version], [0.9.4])
 m4_define([sqlite_minimum_version], [3.5])
 m4_define([libical_minimum_version], [0.43])
 
@@ -364,15 +363,6 @@ if test "x$enable_goa" = xyes; then
 	please append --disable-goa to configure.
 	])])
 
-	PKG_CHECK_MODULES([OAUTH], [oauth >= oauth_minimum_version],,
-	[AC_MSG_ERROR([
-
-	oauth not found (or version < oauth_minimum_version)
-
-	If you want to disable GNOME Online Accounts support,
-	please append --disable-goa to configure.
-	])])
-
 	AC_DEFINE(HAVE_GOA, 1, [Define to 1 if you have the goa-1.0 package.])
 fi
 AM_CONDITIONAL(HAVE_GOA, [test x$enable_goa = xyes])



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