summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core_api.c4
-rw-r--r--src/core/gnunet-core-list-connections.c31
-rw-r--r--src/core/gnunet-service-core_clients.c26
-rw-r--r--src/core/gnunet-service-core_neighbours.c8
-rw-r--r--src/core/gnunet-service-core_sessions.c10
-rw-r--r--src/core/test_core_quota_compliance.c16
6 files changed, 45 insertions, 50 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c
index a279874d7..281a851e0 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -1424,8 +1424,8 @@ GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork,
}
/* Order entries by deadline, but SKIP 'HEAD' (as we may have transmitted
- that request already or might even already be approved to transmit that
- message to core) */
+ * that request already or might even already be approved to transmit that
+ * message to core) */
pos = pr->pending_head;
if (pos != NULL)
pos = pos->next; /* skip head */
diff --git a/src/core/gnunet-core-list-connections.c b/src/core/gnunet-core-list-connections.c
index e0d95d0f8..c93f50981 100644
--- a/src/core/gnunet-core-list-connections.c
+++ b/src/core/gnunet-core-list-connections.c
@@ -98,11 +98,11 @@ dump_pc (struct PrintContext *pc)
* @param address NULL on error, otherwise 0-terminated printable UTF-8 string
*/
static void
-process_resolved_address (void *cls,
- const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_HELLO_Address *address)
+process_resolved_address (void *cls, const struct GNUNET_PeerIdentity *peer,
+ const struct GNUNET_HELLO_Address *address)
{
struct PrintContext *pc = cls;
+
// struct AddressStringList *new_address;
if (address == NULL)
@@ -111,16 +111,16 @@ process_resolved_address (void *cls,
return;
}
- /* This does exactly the same as gnunet-transport -i !*/
+ /* This does exactly the same as gnunet-transport -i ! */
/*
- new_address = GNUNET_malloc (sizeof (struct AddressStringList));
-#if VERBOSE
- fprintf (stderr, "Received address %s\n", address);
-#endif
-
- new_address->address_string = GNUNET_strdup ("FIXME");
- GNUNET_CONTAINER_DLL_insert (pc->address_list_head, pc->address_list_tail,
- new_address);
+ * new_address = GNUNET_malloc (sizeof (struct AddressStringList));
+ * #if VERBOSE
+ * fprintf (stderr, "Received address %s\n", address);
+ * #endif
+ *
+ * new_address->address_string = GNUNET_strdup ("FIXME");
+ * GNUNET_CONTAINER_DLL_insert (pc->address_list_head, pc->address_list_tail,
+ * new_address);
*/
}
@@ -143,12 +143,9 @@ connected_peer_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
#endif
pc = GNUNET_malloc (sizeof (struct PrintContext));
pc->peer = *peer;
- GNUNET_TRANSPORT_peer_get_active_addresses (cfg,
- peer,
- GNUNET_YES,
+ GNUNET_TRANSPORT_peer_get_active_addresses (cfg, peer, GNUNET_YES,
GNUNET_TIME_UNIT_MINUTES,
- &process_resolved_address,
- pc);
+ &process_resolved_address, pc);
}
#if VERBOSE
else
diff --git a/src/core/gnunet-service-core_clients.c b/src/core/gnunet-service-core_clients.c
index 5448d5d0f..4098b45b1 100644
--- a/src/core/gnunet-service-core_clients.c
+++ b/src/core/gnunet-service-core_clients.c
@@ -343,13 +343,14 @@ handle_client_send_request (void *cls, struct GNUNET_SERVER_Client *client,
"Client asked for transmission to `%s'\n",
GNUNET_i2s (&req->peer));
#endif
- is_loopback = (0 ==
- memcmp (&req->peer, &GSC_my_identity,
- sizeof (struct GNUNET_PeerIdentity)));
- if ( (! is_loopback) &&
- (GNUNET_YES !=
- GNUNET_CONTAINER_multihashmap_contains (c->connectmap,
- &req->peer.hashPubKey)) )
+ is_loopback =
+ (0 ==
+ memcmp (&req->peer, &GSC_my_identity,
+ sizeof (struct GNUNET_PeerIdentity)));
+ if ((!is_loopback) &&
+ (GNUNET_YES !=
+ GNUNET_CONTAINER_multihashmap_contains (c->connectmap,
+ &req->peer.hashPubKey)))
{
/* neighbour must have disconnected since request was issued,
* ignore (client will realize it once it processes the
@@ -390,8 +391,8 @@ handle_client_send_request (void *cls, struct GNUNET_SERVER_Client *client,
GSC_CLIENTS_solicit_request (car);
GNUNET_SERVER_receive_done (client, GNUNET_OK);
return;
- }
- GSC_SESSIONS_queue_request (car);
+ }
+ GSC_SESSIONS_queue_request (car);
GNUNET_SERVER_receive_done (client, GNUNET_OK);
}
@@ -610,13 +611,12 @@ GSC_CLIENTS_solicit_request (struct GSC_ClientActiveRequest *car)
c = car->client_handle;
if (GNUNET_YES !=
GNUNET_CONTAINER_multihashmap_contains (c->connectmap,
- &car->
- target.hashPubKey))
+ &car->target.hashPubKey))
{
/* connection has gone down since, drop request */
GNUNET_assert (0 !=
- memcmp (&car->target, &GSC_my_identity,
- sizeof (struct GNUNET_PeerIdentity)));
+ memcmp (&car->target, &GSC_my_identity,
+ sizeof (struct GNUNET_PeerIdentity)));
GSC_SESSIONS_dequeue_request (car);
GSC_CLIENTS_reject_request (car);
return;
diff --git a/src/core/gnunet-service-core_neighbours.c b/src/core/gnunet-service-core_neighbours.c
index 0e292fbd1..6c696ce84 100644
--- a/src/core/gnunet-service-core_neighbours.c
+++ b/src/core/gnunet-service-core_neighbours.c
@@ -427,10 +427,10 @@ handle_transport_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
break;
default:
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("Unsupported message of type %u (%u bytes) received from peer `%s'\n"),
- (unsigned int) type,
- (unsigned int) ntohs (message->size),
- GNUNET_i2s (peer));
+ _
+ ("Unsupported message of type %u (%u bytes) received from peer `%s'\n"),
+ (unsigned int) type, (unsigned int) ntohs (message->size),
+ GNUNET_i2s (peer));
return;
}
}
diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c
index 219272809..1f697cf16 100644
--- a/src/core/gnunet-service-core_sessions.c
+++ b/src/core/gnunet-service-core_sessions.c
@@ -172,7 +172,7 @@ GSC_SESSIONS_end (const struct GNUNET_PeerIdentity *pid)
struct Session *session;
struct GSC_ClientActiveRequest *car;
struct SessionMessageEntry *sme;
-
+
session = find_session (pid);
if (NULL == session)
return;
@@ -193,9 +193,7 @@ GSC_SESSIONS_end (const struct GNUNET_PeerIdentity *pid)
}
while (NULL != (sme = session->sme_head))
{
- GNUNET_CONTAINER_DLL_remove (session->sme_head,
- session->sme_tail,
- sme);
+ GNUNET_CONTAINER_DLL_remove (session->sme_head, session->sme_tail, sme);
GNUNET_free (sme);
}
GNUNET_SCHEDULER_cancel (session->typemap_task);
@@ -347,7 +345,7 @@ GSC_SESSIONS_queue_request (struct GSC_ClientActiveRequest *car)
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Dropped client request for transmission (am disconnected)\n");
#endif
- GNUNET_break (0); /* should have been rejected earlier */
+ GNUNET_break (0); /* should have been rejected earlier */
GSC_CLIENTS_reject_request (car);
return;
}
@@ -438,7 +436,7 @@ solicit_messages (struct Session *session)
discard_expired_requests (session);
so_size = 0;
nxt = session->active_client_request_head;
- while (NULL != (car = nxt) )
+ while (NULL != (car = nxt))
{
nxt = car->next;
if (so_size + car->msize > GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE)
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c
index 59305725a..adfa93f1f 100644
--- a/src/core/test_core_quota_compliance.c
+++ b/src/core/test_core_quota_compliance.c
@@ -630,20 +630,20 @@ run (void *cls, char *const *args, const char *cfgfile,
GNUNET_assert (test != -1);
GNUNET_assert (GNUNET_SYSERR !=
GNUNET_CONFIGURATION_get_value_size (p1.cfg, "ATS",
- "WAN_QUOTA_IN",
- &current_quota_p1_in));
+ "WAN_QUOTA_IN",
+ &current_quota_p1_in));
GNUNET_assert (GNUNET_SYSERR !=
GNUNET_CONFIGURATION_get_value_size (p2.cfg, "ATS",
- "WAN_QUOTA_IN",
- &current_quota_p2_in));
+ "WAN_QUOTA_IN",
+ &current_quota_p2_in));
GNUNET_assert (GNUNET_SYSERR !=
GNUNET_CONFIGURATION_get_value_size (p1.cfg, "ATS",
- "WAN_QUOTA_OUT",
- &current_quota_p1_out));
+ "WAN_QUOTA_OUT",
+ &current_quota_p1_out));
GNUNET_assert (GNUNET_SYSERR !=
GNUNET_CONFIGURATION_get_value_size (p2.cfg, "ATS",
- "WAN_QUOTA_OUT",
- &current_quota_p2_out));
+ "WAN_QUOTA_OUT",
+ &current_quota_p2_out));
p1.ch =
GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify,