summaryrefslogtreecommitdiff
path: root/tests/wocky-test-connector-server.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-11-23 16:50:18 +0000
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-11-24 18:09:40 +0000
commit9eeb7a6db8d412545cab7aa9ce7bb6d57bfc868b (patch)
treed664797d3ba61e9983f8045cf987f8bc4f29edce /tests/wocky-test-connector-server.c
parentf8aa7c3656204929620a8fc07011f5568655ab27 (diff)
Add API to get the last used SASL mechanism from the test server
Diffstat (limited to 'tests/wocky-test-connector-server.c')
-rw-r--r--tests/wocky-test-connector-server.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/wocky-test-connector-server.c b/tests/wocky-test-connector-server.c
index 88b3171..a71476d 100644
--- a/tests/wocky-test-connector-server.c
+++ b/tests/wocky-test-connector-server.c
@@ -106,6 +106,8 @@ struct _TestConnectorServerPrivate
gchar *pass;
gchar *version;
+ gchar *used_mech;
+
CertSet cert;
WockyTLSSession *tls_sess;
WockyTLSConnection *tls_conn;
@@ -159,6 +161,7 @@ test_connector_server_finalise (GObject *object)
g_free (priv->user);
g_free (priv->pass);
g_free (priv->version);
+ g_free (priv->used_mech);
G_OBJECT_CLASS (test_connector_server_parent_class)->finalize (object);
}
@@ -1224,6 +1227,9 @@ after_auth (GObject *source,
return;
}
+ priv->used_mech = g_strdup (test_sasl_auth_server_get_selected_mech
+ (priv->sasl));
+
g_object_unref (priv->sasl);
priv->sasl = NULL;
@@ -1616,3 +1622,11 @@ test_connector_server_start (TestConnectorServer *self)
xmpp_init (NULL,NULL,self);
}
}
+
+const gchar *
+test_connector_server_get_used_mech (TestConnectorServer *self)
+{
+ TestConnectorServerPrivate *priv = TEST_CONNECTOR_SERVER_GET_PRIVATE (self);
+
+ return priv->used_mech;
+}