[Telepathy-commits] [telepathy-doc/master] Minor comments changes.

Murray Cumming murrayc at murrayc.com
Tue Nov 18 01:58:54 PST 2008


---
 docs/examples/connect/main.c            |    8 +++++++-
 docs/examples/list_all_protocols/main.c |    7 ++++++-
 docs/examples/list_contacts/main.c      |    9 ++++++++-
 3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/docs/examples/connect/main.c b/docs/examples/connect/main.c
index e4062ea..82731da 100644
--- a/docs/examples/connect/main.c
+++ b/docs/examples/connect/main.c
@@ -206,11 +206,17 @@ main (int argc, char **argv)
       "jabber", parameters, got_connection, NULL, NULL, NULL);
 
   g_hash_table_unref (parameters);
+  parameters = NULL;
 
+
+  /* Run the main loop, 
+   * to keep our application alive while we wait for responses from telepathy.
+   * This function returns when we call g_main_loop_quit() from elsewhere.
+   */
   g_main_loop_run (mainloop);
 
+  /* Clean up: */
   g_object_unref (connection_manager);
-
   g_main_loop_unref (mainloop);
   g_object_unref (bus_daemon);
 
diff --git a/docs/examples/list_all_protocols/main.c b/docs/examples/list_all_protocols/main.c
index 7e0cbb5..035ffe4 100644
--- a/docs/examples/list_all_protocols/main.c
+++ b/docs/examples/list_all_protocols/main.c
@@ -186,8 +186,13 @@ main (int argc, char **argv)
 
   /* tp_list_connection_names (bus_daemon, got_connections, &data, NULL, NULL); */
 
-  /* Start the main loop, and clean up when it finishes. */
+  /* Run the main loop, 
+   * to keep our application alive while we wait for responses from telepathy.
+   * This function returns when we call g_main_loop_quit() from elsewhere.
+   */
   g_main_loop_run (mainloop);
+
+  /* Clean up: */
   g_main_loop_unref (mainloop);
   g_object_unref (bus_daemon);
 
diff --git a/docs/examples/list_contacts/main.c b/docs/examples/list_contacts/main.c
index eb1a1e7..accd745 100644
--- a/docs/examples/list_contacts/main.c
+++ b/docs/examples/list_contacts/main.c
@@ -402,11 +402,18 @@ main (int argc, char **argv)
       "jabber", parameters, got_connection, NULL, NULL, NULL);
 
   g_hash_table_unref (parameters);
+  parameters = NULL;
 
+
+  /* Run the main loop, 
+   * to keep our application alive while we wait for responses from telepathy.
+   * This function returns when we call g_main_loop_quit() from elsewhere.
+   */
   g_main_loop_run (mainloop);
 
-  g_object_unref (connection_manager);
 
+  /* Clean up: */
+  g_object_unref (connection_manager);
   g_main_loop_unref (mainloop);
   g_object_unref (bus_daemon);
 
-- 
1.5.6.5



More information about the Telepathy-commits mailing list