+2006-12-04 Harish Krishnaswamy <kharish@novell.com>
+
+ * Makefile.am, e-gw-connection.c: (form_login_request):
+ Embed build timestamps into GroupWise login requests.
+ Fixes bugzilla.novell.com #174655.
+
+2006-12-03 Harish Krishnaswamy <kharish@novell.com>
+
+ * e-gw-connection.c: (e_gw_connection_dispose):
+ Clean up the code to remove redundant lookups and
+ fix leaking of temporary strings.
+ (form_login_request), (e_gw_connection_new),
+ (e_gw_connection_get_proxy_connection): Fix leaks of
+ hash_key, name.
+
2006-12-03 Harish Krishnaswamy <kharish@novell.com>
* e-gw-item.c: (e_gw_item_dispose): Fix leak of end_date.
libegroupwise-1.2.la \
$(E_DATA_SERVER_LIBS)
+build-timestamp.h : $(top_builddir)/config.h
+ echo "const char *build_timestamp = \"Evolution-Data=Server-@BASE_VERSION@-`date +%F`\";" > $@
+
+BUILT_SOURCES = build-timestamp.h
+NODIST_FILES = build-timestamp.h
+CLEANFILES = build-timestamp.h
+
lib_LTLIBRARIES = libegroupwise-1.2.la
libegroupwise_1_2_la_SOURCES = \
e-gw-recur-utils.c \
e-gw-recur-utils.h \
e-gw-proxy.h \
- e-gw-proxy.c
+ e-gw-proxy.c \
+ build-timestamp.h
libegroupwise_1_2_la_LIBADD = \
$(E_DATA_SERVER_LIBS) \
EXTRA_DIST = $(pkgconfig_DATA:-$(API_VERSION).pc=.pc.in)
DISTCLEANFILES = $(pkgconfig_DATA)
+
#include "e-gw-connection.h"
#include "e-gw-message.h"
#include "e-gw-filter.h"
+#include "build-timestamp.h"
/* For soup sync session timeout */
#define GW_SOUP_SESSION_TIMEOUT 30
{
EGwConnection *cnc = (EGwConnection *) object;
EGwConnectionPrivate *priv;
- char *hash_key;
- gpointer orig_key, orig_value;
+ char *hash_key, permissions_key;
g_return_if_fail (E_IS_GW_CONNECTION (cnc));
priv->username ? priv->username : "",
priv->password ? priv->password : "",
priv->uri ? priv->uri : "");
- if (g_hash_table_lookup_extended (loaded_connections_permissions, hash_key, &orig_key, &orig_value)) {
- g_hash_table_remove (loaded_connections_permissions, hash_key);
- if (g_hash_table_size (loaded_connections_permissions) == 0) {
- g_hash_table_destroy (loaded_connections_permissions);
- loaded_connections_permissions = NULL;
- }
-
- g_free (orig_key);
+ g_hash_table_remove (loaded_connections_permissions, hash_key);
+ if (g_hash_table_size (loaded_connections_permissions) == 0) {
+ g_hash_table_destroy (loaded_connections_permissions);
+ loaded_connections_permissions = NULL;
}
g_free (hash_key);
}
SoupSoapMessage *msg;
/* build the SOAP message */
msg = e_gw_message_new_with_header (uri, NULL, "loginRequest");
+ e_gw_message_write_string_parameter (msg, "application", "types", build_timestamp);
soup_soap_message_start_element (msg, "auth", "types", NULL);
soup_soap_message_add_attribute (msg, "type", "types:PlainText", "xsi",
"http://www.w3.org/2001/XMLSchema-instance");
cnc->priv->password ? cnc->priv->password : "",
cnc->priv->uri);
if (loaded_connections_permissions == NULL)
- loaded_connections_permissions = g_hash_table_new (g_str_hash, g_str_equal);
+ loaded_connections_permissions = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free, NULL);
g_hash_table_insert (loaded_connections_permissions, hash_key, cnc);
/* free memory */
parent_cnc->priv->uri);
cnc = g_hash_table_lookup (loaded_connections_permissions, hash_key);
permissions_key = g_strdup_printf ("%s:permissions", hash_key);
- g_free (hash_key);
if (E_IS_GW_CONNECTION (cnc)) {
*permissions = GPOINTER_TO_INT (g_hash_table_lookup (loaded_connections_permissions, permissions_key));
g_free (permissions_key);
+ g_free (name);
+ g_free (hash_key);
g_object_ref (cnc);
g_static_mutex_unlock (&connecting);
return cnc;
/* free memory */
g_object_unref (response);
g_object_unref (msg);
+ g_free (name);
g_static_mutex_unlock (&connecting);
return cnc;
}