[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28102 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28102 - gnunet/src/transport |
Date: |
Wed, 17 Jul 2013 09:12:23 +0200 |
Author: wachs
Date: 2013-07-17 09:12:23 +0200 (Wed, 17 Jul 2013)
New Revision: 28102
Modified:
gnunet/src/transport/plugin_transport_tcp.c
gnunet/src/transport/plugin_transport_udp.c
Log:
removing breaks, adding stats
Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2013-07-17 07:03:04 UTC (rev
28101)
+++ gnunet/src/transport/plugin_transport_tcp.c 2013-07-17 07:12:23 UTC (rev
28102)
@@ -1410,9 +1410,10 @@
}
else
{
- LOG (GNUNET_ERROR_TYPE_WARNING,
- _("Trying to create session for address of unexpected length %u (should
be %u or %u)\n"),
- addrlen, sizeof (struct IPv4TcpAddress), sizeof (struct
IPv6TcpAddress));
+ GNUNET_STATISTICS_update (plugin->env->stats,
+ gettext_noop
+ ("# requests to create session with invalid
address"),
+ 1, GNUNET_NO);
return NULL;
}
@@ -1629,7 +1630,7 @@
ppc_cancel_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct PrettyPrinterContext *ppc = cls;
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "PPC %p was not removed!\n", ppc);
+ /* GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "PPC %p was not removed!\n",
ppc); */
ppc->timeout_task = GNUNET_SCHEDULER_NO_TASK;
if (NULL != ppc->resolver_handle)
{
@@ -1654,7 +1655,7 @@
struct PrettyPrinterContext *ppc = cls;
struct PrettyPrinterContext *cur;
char *ret;
-
+ /* GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "PPC callback: %p `%s'\n",ppc,
hostname); */
if (hostname == NULL)
{
ppc->asc (ppc->asc_cls, NULL);
@@ -1819,11 +1820,11 @@
if ((addrlen != sizeof (struct IPv4TcpAddress)) &&
(addrlen != sizeof (struct IPv6TcpAddress)))
{
- GNUNET_break_op (0);
- return GNUNET_SYSERR;
+
+
+ return GNUNET_SYSERR;
}
-
if (addrlen == sizeof (struct IPv4TcpAddress))
{
v4 = (struct IPv4TcpAddress *) addr;
Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2013-07-17 07:03:04 UTC (rev
28101)
+++ gnunet/src/transport/plugin_transport_udp.c 2013-07-17 07:12:23 UTC (rev
28102)
@@ -584,7 +584,6 @@
}
else
{
- GNUNET_break_op (0);
return NULL;
}
inet_ntop (af, sb, buf, INET6_ADDRSTRLEN);
@@ -706,7 +705,7 @@
ppc_cancel_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct PrettyPrinterContext *ppc = cls;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "PPC %p was not removed!\n", ppc);
+ /* GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "PPC %p was not removed!\n",
ppc); */
ppc->timeout_task = GNUNET_SCHEDULER_NO_TASK;
if (NULL != ppc->resolver_handle)
{
@@ -731,7 +730,7 @@
struct PrettyPrinterContext *ppc = cls;
struct PrettyPrinterContext *cur;
char *ret;
-
+ /* GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "PPC callback: %p `%s'\n",ppc,
hostname); */
if (hostname == NULL)
{
ppc->asc (ppc->asc_cls, NULL);
@@ -1069,7 +1068,6 @@
if ((addrlen != sizeof (struct IPv4UdpAddress)) &&
(addrlen != sizeof (struct IPv6UdpAddress)))
{
- GNUNET_break_op (0);
return GNUNET_SYSERR;
}
if (addrlen == sizeof (struct IPv4UdpAddress))
@@ -1451,7 +1449,10 @@
break;
default:
/* Must have a valid address to send to */
- GNUNET_break_op (0);
+ GNUNET_STATISTICS_update (plugin->env->stats,
+ gettext_noop
+ ("# requests to create session with invalid
address"),
+ 1, GNUNET_NO);
return NULL;
}
s->addrlen = len;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28102 - gnunet/src/transport,
gnunet <=