libpurple/protocols/gg/pubdir-prpl.c

branch
soc.2013.gobjectification.plugins
changeset 37148
50f361d39a1e
parent 37101
8ba9a23354ff
parent 36068
e9b9320a985a
child 37155
1aee6d5eefba
--- a/libpurple/protocols/gg/pubdir-prpl.c	Tue May 20 10:59:21 2014 +0530
+++ b/libpurple/protocols/gg/pubdir-prpl.c	Sat May 24 02:32:01 2014 +0530
@@ -199,7 +199,9 @@
 	PurpleHttpRequest *req;
 	ggp_pubdir_request *request = _request;
 
-	if (!token || !PURPLE_CONNECTION_IS_VALID(gc)) {
+	PURPLE_ASSERT_CONNECTION_IS_VALID(gc);
+
+	if (!token) {
 		request->cb(gc, -1, NULL, 0, request->user_data);
 		ggp_pubdir_request_free(request);
 		return;
@@ -627,7 +629,9 @@
 	ggp_pubdir_request *request = _request;
 	gchar *query;
 
-	if (!token || !PURPLE_CONNECTION_IS_VALID(gc)) {
+	PURPLE_ASSERT_CONNECTION_IS_VALID(gc);
+
+	if (!token) {
 		request->cb(gc, -1, NULL, 0, request->user_data);
 		ggp_pubdir_request_free(request);
 		return;
@@ -899,7 +903,9 @@
 	gchar *name, *surname, *city;
 	uin_t uin = record->uin;
 
-	if (!token || !PURPLE_CONNECTION_IS_VALID(gc)) {
+	PURPLE_ASSERT_CONNECTION_IS_VALID(gc);
+
+	if (!token) {
 		/* TODO: notify about failure */
 		ggp_pubdir_record_free(record, 1);
 		return;

mercurial