summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEitan Isaacson <eitan.isaacson@collabora.co.uk>2010-05-03 11:34:33 -0700
committerEitan Isaacson <eitan.isaacson@collabora.co.uk>2010-05-04 13:11:23 -0700
commit27de8fd6dc7ea50919de1a71905cb2074a467e5d (patch)
treecc5ec43ee3d9eb4d3debab684572060c2ad696a8 /examples
parentf11a7a3774b1ce8204c421703210706b65ba984f (diff)
Default WockyAuthRegistry upon construction.
New WockyAuthRegistry arg in both wocky_connector_new() and wocky_sasl_auth_new(). If NULL is passed in either, the default WockyAuthRegisty is used.
Diffstat (limited to 'examples')
-rw-r--r--examples/connect.c8
-rw-r--r--examples/register.c2
-rw-r--r--examples/unregister.c2
3 files changed, 4 insertions, 8 deletions
diff --git a/examples/connect.c b/examples/connect.c
index 1f1a7aa..d9f3825 100644
--- a/examples/connect.c
+++ b/examples/connect.c
@@ -68,7 +68,6 @@ ssl_features_received_cb (GObject *source,
{
WockyStanza *stanza;
WockyNode *node;
- WockyAuthRegistry *auth_registry;
stanza = wocky_xmpp_connection_recv_stanza_finish (conn, result, NULL);
@@ -84,10 +83,7 @@ ssl_features_received_cb (GObject *source,
return;
}
- auth_registry = wocky_auth_registry_new ();
- sasl = wocky_sasl_auth_new (server, username, password, conn, auth_registry);
-
- g_object_unref (auth_registry);
+ sasl = wocky_sasl_auth_new (server, username, password, conn, NULL);
wocky_sasl_auth_authenticate_async (sasl, stanza, TRUE,
NULL, auth_done_cb, NULL);
@@ -403,7 +399,7 @@ main (int argc,
{
WockyConnector *wcon = NULL;
wocky_init ();
- wcon = wocky_connector_new (argv[1], argv[2], NULL);
+ wcon = wocky_connector_new (argv[1], argv[2], NULL, NULL);
wocky_connector_connect_async (wcon, connector_callback, NULL);
g_main_loop_run (mainloop);
diff --git a/examples/register.c b/examples/register.c
index 9cd42df..dac1416 100644
--- a/examples/register.c
+++ b/examples/register.c
@@ -66,7 +66,7 @@ main (int argc,
mainloop = g_main_loop_new (NULL, FALSE);
if ((host != NULL) && (*host != '\0'))
- wcon = wocky_connector_new (jid, pass, NULL);
+ wcon = wocky_connector_new (jid, pass, NULL, NULL);
else
wcon = g_object_new (WOCKY_TYPE_CONNECTOR,
"jid" , jid ,
diff --git a/examples/unregister.c b/examples/unregister.c
index b754299..43963b4 100644
--- a/examples/unregister.c
+++ b/examples/unregister.c
@@ -62,7 +62,7 @@ main (int argc,
mainloop = g_main_loop_new (NULL, FALSE);
if ((host != NULL) && (*host != '\0'))
- wcon = wocky_connector_new (jid, pass, NULL);
+ wcon = wocky_connector_new (jid, pass, NULL, NULL);
else
wcon = g_object_new (WOCKY_TYPE_CONNECTOR,
"jid" , jid ,