[asterisk-commits] snuffy: branch snuffy/ao2_jabber_take2 r161532 - in /team/snuffy/ao2_jabber_t...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Dec 6 00:26:29 CST 2008


Author: snuffy
Date: Sat Dec  6 00:26:26 2008
New Revision: 161532

URL: http://svn.digium.com/view/asterisk?view=rev&rev=161532
Log:
Small changes.. still req lot work and testing 2nd set of eyes..

Modified:
    team/snuffy/ao2_jabber_take2/channels/chan_gtalk.c
    team/snuffy/ao2_jabber_take2/channels/chan_jingle.c
    team/snuffy/ao2_jabber_take2/res/res_jabber.c

Modified: team/snuffy/ao2_jabber_take2/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/team/snuffy/ao2_jabber_take2/channels/chan_gtalk.c?view=diff&rev=161532&r1=161531&r2=161532
==============================================================================
--- team/snuffy/ao2_jabber_take2/channels/chan_gtalk.c (original)
+++ team/snuffy/ao2_jabber_take2/channels/chan_gtalk.c Sat Dec  6 00:26:26 2008
@@ -892,7 +892,7 @@
 	if (!sid && !strchr(them, '/')) {	/* I started call! */
 		if (!strcasecmp(client->name, "guest")) {
 			ast_copy_string(tmp_buddy.name, them, sizeof(tmp_buddy.name));
-			buddy = ao2_t_find(client->connection->buddies, &tmp_buddy, NULL, OBJ_POINTER, "find buddy");
+			buddy = ao2_t_find(client->connection->buddies, &tmp_buddy, OBJ_POINTER, "find buddy");
 			if (buddy)
 				resources = buddy->resources;
 		} else if (client->buddy)
@@ -1852,8 +1852,7 @@
 	if (member->connection && member->user) {
 		struct aji_buddy tmp_buddy;
 		ast_copy_string(tmp_buddy.name, member->user, sizeof(tmp_buddy.name));
-		member->buddy = ao2_t_find(member->connection->buddies, &tmp_buddy, NULL, OBJ_POINTER, "find buddy");
-		//ao2_t_ref(member->buddy, -1, "create etc");
+		member->buddy = ao2_t_find(member->connection->buddies, &tmp_buddy, OBJ_POINTER, "find buddy");
 	} else {
 		ast_log(LOG_ERROR, "No Connection or Username!\n");
 	}

Modified: team/snuffy/ao2_jabber_take2/channels/chan_jingle.c
URL: http://svn.digium.com/view/asterisk/team/snuffy/ao2_jabber_take2/channels/chan_jingle.c?view=diff&rev=161532&r1=161531&r2=161532
==============================================================================
--- team/snuffy/ao2_jabber_take2/channels/chan_jingle.c (original)
+++ team/snuffy/ao2_jabber_take2/channels/chan_jingle.c Sat Dec  6 00:26:26 2008
@@ -749,7 +749,7 @@
 	if (!sid && !strchr(from, '/')) {	/* I started call! */
 		if (!strcasecmp(client->name, "guest")) {
 			ast_copy_string(tmp_buddy.name, from, sizeof(tmp_buddy.name));
-			buddy = ao2_t_find(client->connection->buddies, &tmp_buddy, NULL, OBJ_POINTER, "find client");
+			buddy = ao2_t_find(client->connection->buddies, &tmp_buddy, OBJ_POINTER, "find client");
 			if (buddy)
 				resources = buddy->resources;
 		} else if (client->buddy)
@@ -1717,7 +1717,7 @@
 	if (member->connection && member->user) {
 		struct aji_buddy tmp_buddy;
 		ast_copy_string(tmp_buddy.name, member->user, sizeof(tmp_buddy.name));
-		member->buddy = ao2_t_find(member->connection->buddies, &tmp_buddy, NULL, OBJ_POINTER, "find buddy");
+		member->buddy = ao2_t_find(member->connection->buddies, &tmp_buddy, OBJ_POINTER, "find buddy");
 	} else {
 		ast_log(LOG_ERROR, "No Connection or Username!\n");
 	}

Modified: team/snuffy/ao2_jabber_take2/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/team/snuffy/ao2_jabber_take2/res/res_jabber.c?view=diff&rev=161532&r1=161531&r2=161532
==============================================================================
--- team/snuffy/ao2_jabber_take2/res/res_jabber.c (original)
+++ team/snuffy/ao2_jabber_take2/res/res_jabber.c Sat Dec  6 00:26:26 2008
@@ -253,14 +253,14 @@
 }
 #endif
 
-static int client_cmp_cb(void *obj, void *arg, void *data, int flags)
+static int client_cmp_cb(void *obj, void *arg, int flags)
 {
 	struct aji_client *client = obj, *client2 = arg;
 
 	return !strcasecmp(client->name, client2->name) ? CMP_MATCH : 0;
 }
 
-static int buddy_cmp_cb(void *obj, void *arg, void *data, int flags)
+static int buddy_cmp_cb(void *obj, void *arg, int flags)
 {
 	struct aji_buddy *buddy = obj, *buddy2 = arg;
 
@@ -518,7 +518,7 @@
 	}
 
 	ast_copy_string(tmp_buddy.name, jid.screenname, sizeof(tmp_buddy.name));
-	buddy = ao2_t_find(client->buddies, &tmp_buddy, NULL, OBJ_POINTER, "Find buddy");
+	buddy = ao2_t_find(client->buddies, &tmp_buddy, OBJ_POINTER, "Find buddy");
 	
 	if (!buddy) {
 		ast_log(LOG_WARNING, "Could not find buddy in list: '%s'\n", jid.screenname);
@@ -578,7 +578,7 @@
 		return -1;
 	}
 	ast_copy_string(tmp_buddy.name, jid.screenname, sizeof(tmp_buddy.name));
-	buddy = ao2_t_find(client->buddies, &tmp_buddy, NULL, OBJ_POINTER, "Find buddy");
+	buddy = ao2_t_find(client->buddies, &tmp_buddy, OBJ_POINTER, "Find buddy");
 	if (!buddy) {
 		ast_log(LOG_WARNING, "Could not find buddy in list: '%s'\n", jid.screenname);
 		client_unref(client, "unref client");
@@ -1266,7 +1266,7 @@
 
 	client_ref(client,"qry_hand");
 	ast_copy_string(tmp_buddy.name, pak->from->partial,sizeof(tmp_buddy.name));
-	buddy = ao2_t_find(client->buddies, &tmp_buddy, NULL, OBJ_POINTER, "Find Buddy");
+	buddy = ao2_t_find(client->buddies, &tmp_buddy, OBJ_POINTER, "Find Buddy");
 	if (!buddy) {
 		iks *iq = NULL, *query = NULL, *error = NULL, *notacceptable = NULL;
 
@@ -1437,7 +1437,7 @@
 	
 	client_ref(client, "info_hand");
 	ast_copy_string(tmp_buddy.name, pak->from->partial, sizeof(tmp_buddy.name));
-	buddy = ao2_t_find(client->buddies, &tmp_buddy, NULL, OBJ_POINTER, "Find buddy");
+	buddy = ao2_t_find(client->buddies, &tmp_buddy, OBJ_POINTER, "Find buddy");
 	resource = aji_find_resource(buddy, pak->from->resource);
 
 	if (pak->subtype == IKS_TYPE_RESULT) {
@@ -1504,7 +1504,7 @@
 	
 	client_ref(client, "dinfo_hand");
 	ast_copy_string(tmp_buddy.name, pak->from->partial, sizeof(tmp_buddy.name));
-	buddy = ao2_t_find(client->buddies, &tmp_buddy, NULL, OBJ_POINTER, "Find buddy");
+	buddy = ao2_t_find(client->buddies, &tmp_buddy, OBJ_POINTER, "Find buddy");
 	resource = aji_find_resource(buddy, pak->from->resource);
 	
 	if (pak->subtype == IKS_TYPE_ERROR) {
@@ -1705,7 +1705,7 @@
 		aji_create_buddy(pak->from->partial, client);
 
 	ast_copy_string(tmp_buddy.name, pak->from->partial, sizeof(tmp_buddy.name));
-	buddy = ao2_t_find(client->buddies, &tmp_buddy, NULL, OBJ_POINTER, "Find Buddy");
+	buddy = ao2_t_find(client->buddies, &tmp_buddy, OBJ_POINTER, "Find Buddy");
 
 	if (!buddy && pak->from->partial) {
 		/* allow our jid to be used to log in with another resource */
@@ -1946,7 +1946,7 @@
 			aji_set_presence(client, pak->from->full, iks_find_attrib(pak->x, "to"), client->status, client->statusmessage);
 	case IKS_TYPE_SUBSCRIBED:
 		ast_copy_string(tmp_buddy.name, pak->from->partial, sizeof(tmp_buddy.name));
-		buddy = ao2_t_find(client->buddies, &tmp_buddy, NULL, OBJ_POINTER, "Find buddy");
+		buddy = ao2_t_find(client->buddies, &tmp_buddy, OBJ_POINTER, "Find buddy");
 		if (!buddy && pak->from->partial) {
 			aji_create_buddy(pak->from->partial, client);
 		} else {
@@ -2745,7 +2745,7 @@
 		name = a->argv[2];
 
 	ast_copy_string(tmp_client.name, name, sizeof(tmp_client.name));
-	if (!(client = ao2_t_find(clients, &tmp_client, NULL, OBJ_POINTER, "Find Client"))) {
+	if (!(client = ao2_t_find(clients, &tmp_client, OBJ_POINTER, "Find Client"))) {
 		ast_cli(a->fd, "Unable to find client '%s'!\n", name);
 		return CLI_FAILURE;
 	}
@@ -2798,7 +2798,7 @@
 	int flag = 0;
 
 	ast_copy_string(tmp_client.name, label, sizeof(tmp_client.name));
-	client = ao2_t_find(clients, &tmp_client, NULL, OBJ_POINTER, "Find client");
+	client = ao2_t_find(clients, &tmp_client, OBJ_POINTER, "Find client");
 	if (!client) {
 		flag = 1;
 		client = ao2_t_alloc(sizeof(*client), aji_client_destroy, "alloc client");
@@ -3044,7 +3044,7 @@
 	int flag = 0;
 	
 	ast_copy_string(tmp_buddy.name, label, sizeof(tmp_buddy.name));
-	buddy = ao2_t_find(client->buddies, &tmp_buddy, NULL, OBJ_POINTER, "find buddy");
+	buddy = ao2_t_find(client->buddies, &tmp_buddy, OBJ_POINTER, "find buddy");
 	if (!buddy) {
 		flag = 1;
 		buddy = ao2_t_alloc(sizeof(*buddy), aji_buddy_destroy, "alloc buddy");
@@ -3122,7 +3122,7 @@
 	char *aux = NULL;
 
 	ast_copy_string(tmp_client.name, name, sizeof(tmp_client.name));
-	client = ao2_t_find(clients, &tmp_client, NULL, OBJ_POINTER, "Find client");
+	client = ao2_t_find(clients, &tmp_client, OBJ_POINTER, "Find client");
 	if (!client && strchr(name, '@')) {
 		citer = ao2_iterator_init(clients, 0);
 	   	while (( c = ao2_t_iterator_next(&citer, "iter through clients"))) {




More information about the asterisk-commits mailing list