summaryrefslogtreecommitdiff
path: root/src/server-tls-manager.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2010-09-13 18:19:02 +0200
committerCosimo Cecchi <cosimoc@gnome.org>2010-09-13 19:19:48 +0200
commite69c3d7ae705847d87c3fe3d1cfee10e3fca9b49 (patch)
treef757e116c4216b503924f19d40a12c06d0b2c687 /src/server-tls-manager.c
parentf4591424a046ac02a444c995ced5d9490bb66ca3 (diff)
Assert that we have a rejection list with at least one element.
Diffstat (limited to 'src/server-tls-manager.c')
-rw-r--r--src/server-tls-manager.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server-tls-manager.c b/src/server-tls-manager.c
index 2f36ee13..760ded33 100644
--- a/src/server-tls-manager.c
+++ b/src/server-tls-manager.c
@@ -403,6 +403,11 @@ gabble_server_tls_manager_get_rejection_details (GabbleServerTLSManager *self,
"rejections", &rejections,
NULL);
+ /* we return 'Invalid_Argument' if Reject() is called with zero
+ * reasons, so if this fails something bad happened.
+ */
+ g_assert (rejections->len >= 1);
+
rejection = g_ptr_array_index (rejections, 0);
tls_reason = g_value_get_uint (g_value_array_get_nth (rejection, 0));