diff options
author | Vivek Dasmohapatra <vivek@collabora.co.uk> | 2009-06-16 19:19:17 +0100 |
---|---|---|
committer | Vivek Dasmohapatra <vivek@collabora.co.uk> | 2009-07-14 17:54:29 +0100 |
commit | 32cd7a984868ba704ba618acf7d374ee8d2f7664 (patch) | |
tree | 91afb1c4dc6be7dfc7f688069f50447c31ae4590 /examples | |
parent | 7d32a1aac743733aacb95dc95ae88e880f4f9a4c (diff) |
Use new wocky_connector_new constructor.
Minor debugging tidyups.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/connect.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/connect.c b/examples/connect.c index a1b83d3..e542497 100644 --- a/examples/connect.c +++ b/examples/connect.c @@ -347,7 +347,7 @@ connector_callback (GObject *source, GAsyncResult *res, gpointer user_data) else { if (error) - fprintf (stderr, "%s: %d: %s\n", + g_warning ("%s: %d: %s\n", g_quark_to_string (error->domain), error->code, error->message); g_main_loop_quit (mainloop); } @@ -378,15 +378,12 @@ main (int argc, if (!strcmp ("connector",type)) { WockyConnector *wcon = NULL; - - wcon = g_object_new (WOCKY_TYPE_CONNECTOR, - "jid", argv[1], - "password", argv[2]); + wcon = wocky_connector_new (argv[1], argv[2]); if (wocky_connector_connect_async (G_OBJECT (wcon), connector_callback, NULL)) { - printf ("Instantiated connector and made successful connect call\n"); + printf ("Instantiated connector and made async connect call\n"); g_main_loop_run (mainloop); } |