[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r21485 - in gnunet/src: ats chat fragmentation gns namestor
From: |
gnunet |
Subject: |
[GNUnet-SVN] r21485 - in gnunet/src: ats chat fragmentation gns namestore transport |
Date: |
Tue, 15 May 2012 01:44:22 +0200 |
Author: grothoff
Date: 2012-05-15 01:44:22 +0200 (Tue, 15 May 2012)
New Revision: 21485
Modified:
gnunet/src/ats/perf_ats_mlp.c
gnunet/src/chat/gnunet-chat.c
gnunet/src/fragmentation/defragmentation.c
gnunet/src/gns/gnunet-gns-fcfsd.c
gnunet/src/gns/gnunet-service-gns.c
gnunet/src/namestore/namestore_api.c
gnunet/src/transport/plugin_transport_tcp.c
Log:
-fixing misc seaspider parser errors
Modified: gnunet/src/ats/perf_ats_mlp.c
===================================================================
--- gnunet/src/ats/perf_ats_mlp.c 2012-05-14 21:06:50 UTC (rev 21484)
+++ gnunet/src/ats/perf_ats_mlp.c 2012-05-14 23:44:22 UTC (rev 21485)
@@ -231,7 +231,7 @@
if ((update_percentage >= 0) && (update_percentage <= 100))
{
update = GNUNET_YES;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Benchmarking with existing
presolution and %u \% updated addresses\n", update_percentage);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Benchmarking with existing
presolution and %u%% updated addresses\n", update_percentage);
}
else if ((update_percentage > 100) && (update_percentage != UINT_MAX))
{
Modified: gnunet/src/chat/gnunet-chat.c
===================================================================
--- gnunet/src/chat/gnunet-chat.c 2012-05-14 21:06:50 UTC (rev 21484)
+++ gnunet/src/chat/gnunet-chat.c 2012-05-14 23:44:22 UTC (rev 21485)
@@ -44,13 +44,14 @@
static struct GNUNET_CHAT_Room *room;
-static GNUNET_SCHEDULER_TaskIdentifier handle_cmd_task =
- GNUNET_SCHEDULER_NO_TASK;
+static GNUNET_SCHEDULER_TaskIdentifier handle_cmd_task;
+typedef int (*ActionFunction)(const char *argumetns, const void *xtra);
+
struct ChatCommand
{
const char *command;
- int (*Action) (const char *arguments, const void *xtra);
+ ActionFunction Action;
const char *helptext;
};
@@ -234,7 +235,8 @@
const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
*member_id,
enum GNUNET_CHAT_MsgOptions options)
{
- char *nick, *non_unique_nick;
+ char *nick;
+ char *non_unique_nick;
int nick_is_a_dup;
GNUNET_HashCode id;
struct UserList *pos;
Modified: gnunet/src/fragmentation/defragmentation.c
===================================================================
--- gnunet/src/fragmentation/defragmentation.c 2012-05-14 21:06:50 UTC (rev
21484)
+++ gnunet/src/fragmentation/defragmentation.c 2012-05-14 23:44:22 UTC (rev
21485)
@@ -362,7 +362,7 @@
if (ret.rel_value == 0)
ret = GNUNET_TIME_UNIT_MILLISECONDS; /* always at least 1 */
return ret;
-};
+}
/**
Modified: gnunet/src/gns/gnunet-gns-fcfsd.c
===================================================================
--- gnunet/src/gns/gnunet-gns-fcfsd.c 2012-05-14 21:06:50 UTC (rev 21484)
+++ gnunet/src/gns/gnunet-gns-fcfsd.c 2012-05-14 23:44:22 UTC (rev 21485)
@@ -621,7 +621,7 @@
struct GNUNET_NETWORK_FDSet *wes;
int max;
int haveto;
- unsigned MHD_LONG_LONG timeout;
+ MHD_LONG_LONG timeout;
struct GNUNET_TIME_Relative tv;
FD_ZERO (&rs);
Modified: gnunet/src/gns/gnunet-service-gns.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns.c 2012-05-14 21:06:50 UTC (rev 21484)
+++ gnunet/src/gns/gnunet-service-gns.c 2012-05-14 23:44:22 UTC (rev 21485)
@@ -146,14 +146,14 @@
/**
* Useful for zone update for DHT put
*/
-static int num_public_records = 0;
+static int num_public_records;
/**
* update interval in seconds
*/
-static unsigned long long int max_record_put_interval;
+static unsigned long long max_record_put_interval;
-static unsigned long long int dht_max_update_interval;
+static unsigned long long dht_max_update_interval;
/* dht update interval FIXME define? */
static struct GNUNET_TIME_Relative record_put_interval;
@@ -383,10 +383,9 @@
static void
update_zone_dht_start(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Scheduling DHT zone update!\n");
-
- unsigned long long int interval = 0;
+ unsigned long long interval = 0;
+ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Scheduling DHT zone update!\n");
if (0 == num_public_records)
{
/**
Modified: gnunet/src/namestore/namestore_api.c
===================================================================
--- gnunet/src/namestore/namestore_api.c 2012-05-14 21:06:50 UTC (rev
21484)
+++ gnunet/src/namestore/namestore_api.c 2012-05-14 23:44:22 UTC (rev
21485)
@@ -935,8 +935,9 @@
}
GNUNET_free(h);
h = NULL;
-};
+}
+
/**
* Disconnect from the namestore service (and free associated
* resources).
Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2012-05-14 21:06:50 UTC (rev
21484)
+++ gnunet/src/transport/plugin_transport_tcp.c 2012-05-14 23:44:22 UTC (rev
21485)
@@ -457,6 +457,8 @@
{
struct Plugin *plugin = cls;
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Accepting new incoming TCP connection\n");
if (0 == plugin->max_connections)
return GNUNET_NO;
plugin->max_connections--;
@@ -712,6 +714,9 @@
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp",
"Creating new session for peer `%4s'\n",
GNUNET_i2s (target));
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Creating new TCP session for peer `%s'\n",
+ GNUNET_i2s (target));
ret = GNUNET_malloc (sizeof (struct Session));
ret->last_activity = GNUNET_TIME_absolute_get ();
@@ -1089,9 +1094,10 @@
struct Session * result;
};
-int session_lookup_it (void *cls,
- const GNUNET_HashCode * key,
- void *value)
+static int
+session_lookup_it (void *cls,
+ const GNUNET_HashCode * key,
+ void *value)
{
struct SessionItCtx * si_ctx = cls;
struct Session * session = value;
@@ -1144,11 +1150,10 @@
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp",
"NAT WAIT connection to `%4s' at `%s' could not be
established, removing session\n",
GNUNET_i2s (&session->target), tcp_address_to_string(NULL,
session->addr, session->addrlen));
-
disconnect_session (session);
-
}
+
/**
* Create a new session to transmit data to the target
* This session will used to send data to this peer and the plugin will
@@ -1164,7 +1169,6 @@
{
struct Plugin * plugin = cls;
struct Session * session = NULL;
-
int af;
const void *sb;
size_t sbs;
@@ -1175,20 +1179,19 @@
const struct IPv6TcpAddress *t6;
struct GNUNET_ATS_Information ats;
unsigned int is_natd = GNUNET_NO;
- size_t addrlen = 0;
+ size_t addrlen;
GNUNET_assert (plugin != NULL);
GNUNET_assert (address != NULL);
-
addrlen = address->address_length;
-
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp",
- "Trying to get session for `%s' address length %i\n",
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "tcp",
+ "Trying to get session for `%s' address of peer `%s'\n",
tcp_address_to_string(NULL, address->address,
address->address_length),
- addrlen);
+ GNUNET_i2s (&address->peer));
/* look for existing session */
- if (GNUNET_CONTAINER_multihashmap_contains(plugin->sessionmap,
&address->peer.hashPubKey))
+ if (GNUNET_YES ==
+ GNUNET_CONTAINER_multihashmap_contains(plugin->sessionmap,
&address->peer.hashPubKey))
{
struct SessionItCtx si_ctx;
@@ -1208,6 +1211,11 @@
session);
return session;
}
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "tcp",
+ "Existing sessions did not match address `%s' or peer
`%s'\n",
+ tcp_address_to_string(NULL, address->address,
address->address_length),
+ GNUNET_i2s (&address->peer));
+
}
if (addrlen == sizeof (struct IPv6TcpAddress))
@@ -1281,7 +1289,7 @@
&address->peer.hashPubKey)))
{
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp",
- _("Found valid IPv4 NAT address (creating session)!\n"));
+ "Found valid IPv4 NAT address (creating session)!\n") ;
session = create_session (plugin, &address->peer, NULL, GNUNET_YES);
session->addrlen = 0;
session->addr = NULL;
@@ -1324,7 +1332,7 @@
}
plugin->max_connections--;
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp",
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "tcp",
"Asked to transmit to `%4s', creating fresh session using
address `%s'.\n",
GNUNET_i2s (&address->peer), GNUNET_a2s (sb, sbs));
@@ -1769,7 +1777,7 @@
return;
}
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp",
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "tcp",
"Received %s message from `%4s'\n", "WELCOME",
GNUNET_i2s (&wm->clientIdentity));
GNUNET_STATISTICS_update (plugin->env->stats,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r21485 - in gnunet/src: ats chat fragmentation gns namestore transport,
gnunet <=