summaryrefslogtreecommitdiff
path: root/src/server-tls-manager.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2010-08-19 10:12:12 +0200
committerCosimo Cecchi <cosimoc@gnome.org>2010-08-19 11:15:39 +0200
commited7c9ba0044484cc559ca3d55a9572f95e141d7a (patch)
tree5350fd35cbaebc0f5773e7f5cdf4e7b81e3cead1 /src/server-tls-manager.c
parent80c02d9a756773ffafbccd8b2577c5cfc218ac59 (diff)
Use g_return_if_fail() instead of a debug message
In case verify_async() is called multiple times, which is wrong.
Diffstat (limited to 'src/server-tls-manager.c')
-rw-r--r--src/server-tls-manager.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/server-tls-manager.c b/src/server-tls-manager.c
index f5c2f4a8..e39b01b7 100644
--- a/src/server-tls-manager.c
+++ b/src/server-tls-manager.c
@@ -203,14 +203,12 @@ gabble_server_tls_manager_verify_async (WockyTLSHandler *handler,
gchar *object_path;
GabbleTLSCertificate *certificate;
- if (self->priv->verify_async_called)
- {
- DEBUG ("verify_async() called multiple times, returning.");
- return;
- }
+ /* this should be called only once per-connection. */
+ g_return_if_fail (!self->priv->verify_async_called);
DEBUG ("verify_async() called on the GabbleServerTLSManager.");
+ self->priv->verify_async_called = TRUE;
self->priv->async_result = g_simple_async_result_new (G_OBJECT (self),
callback, user_data, wocky_tls_handler_verify_finish);
self->priv->tls_session = g_object_ref (tls_session);