Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:jberkman
evolution-data-server-2.6
bnc-219731-ex-missing-mtgs.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bnc-219731-ex-missing-mtgs.patch of Package evolution-data-server-2.6
Index: servers/exchange/lib/e2k-context.c =================================================================== --- servers/exchange/lib/e2k-context.c (revision 7597) +++ servers/exchange/lib/e2k-context.c (working copy) @@ -97,6 +97,7 @@ SoupSocket *get_local_address_sock; GIOChannel *listener_channel; int listener_watch_id; + guint idle_notify_id; char *notification_uri; GHashTable *subscriptions_by_id, *subscriptions_by_uri; @@ -167,6 +168,8 @@ if (ctx->priv->listener_watch_id) g_source_remove (ctx->priv->listener_watch_id); + if (ctx->priv->idle_notify_id) + g_source_remove (ctx->priv->idle_notify_id); if (ctx->priv->listener_channel) { g_io_channel_shutdown (ctx->priv->listener_channel, FALSE, NULL); @@ -244,6 +247,11 @@ int s, ret; ctx->priv->get_local_address_sock = NULL; + + if (ctx->priv->idle_notify_id) { + g_source_remove (ctx->priv->idle_notify_id); + ctx->priv->idle_notify_id = 0; + } if (status != SOUP_STATUS_OK) goto done; @@ -297,6 +305,33 @@ g_object_unref (ctx); } +static gboolean +attempt_to_reconnect (gpointer data) +{ + E2kContext *ctx = (E2kContext *) data; + E2kContextPrivate *priv = ctx->priv; + SoupUri *suri; + static guint attempts; + + if (attempts > 3) + return FALSE; + + suri = soup_uri_new (priv->owa_uri); + soup_socket_disconnect (priv->get_local_address_sock); + g_object_unref (priv->get_local_address_sock); + + ctx->priv->get_local_address_sock = + soup_socket_client_new_async ( + suri->host, suri->port, NULL, + got_connection, ctx); + + soup_uri_free (suri); + + attempts++; + return TRUE; +} + + /** * e2k_context_new: * @uri: OWA uri to connect to @@ -328,6 +363,10 @@ soup_socket_client_new_async ( suri->host, suri->port, FALSE, got_connection, ctx); + + /* recconect if the connection does not go well after E2K_SOUP_SESSION_TIMEOUT */ + ctx->priv->idle_notify_id = g_timeout_add (E2K_SOUP_SESSION_TIMEOUT * 1000, (GSourceFunc) attempt_to_reconnect, ctx); + soup_uri_free (suri); return ctx;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor