Do not connect to self when you find that another peer can handle an application...
authorPhilipp Tölke <toelke@in.tum.de>
Wed, 15 Jun 2011 07:15:49 +0000 (07:15 +0000)
committerPhilipp Tölke <toelke@in.tum.de>
Wed, 15 Jun 2011 07:15:49 +0000 (07:15 +0000)
src/mesh/mesh_api.c

index 996c8303c4be13980ce0290aa2a7b869eda6df01..57bea77e196b0c907bbcd7882a3bc45332c484b5 100644 (file)
@@ -496,7 +496,7 @@ GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Handle *handle,
       for (i = element->type_head; i != NULL; i = i->next)
         if (application_type == i->type)
           return GNUNET_MESH_peer_request_connect_all (handle, timeout, 1,
-                                                       &handle->myself,
+                                                       &element->peer,
                                                        connect_handler,
                                                        disconnect_handler,
                                                        handler_cls);