[discident-glib] test: Exit when async is used and failure occurs



commit 22d63a777e4e3ff6bb81707c9527cf6fc4c65b28
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Dec 6 00:30:05 2012 +0100

    test: Exit when async is used and failure occurs

 discident-glib/test-diglib.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/discident-glib/test-diglib.c b/discident-glib/test-diglib.c
index 52f3742..94c684c 100644
--- a/discident-glib/test-diglib.c
+++ b/discident-glib/test-diglib.c
@@ -142,11 +142,12 @@ discident_gtin_print (GObject *source_object,
 		g_message ("Could not get disc ID: %s", error->message);
 		g_object_unref (directory);
 		g_error_free (error);
-		return;
+		goto bail;
 	}
 	g_print ("%s\n", id);
 	g_free (id);
 
+bail:
 	num_queries--;
 	if (num_queries == 0)
 		g_main_loop_quit (loop);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]