[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28022 - gnunet/src/nse
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28022 - gnunet/src/nse |
Date: |
Sun, 14 Jul 2013 21:55:48 +0200 |
Author: grothoff
Date: 2013-07-14 21:55:48 +0200 (Sun, 14 Jul 2013)
New Revision: 28022
Modified:
gnunet/src/nse/nse_api.c
Log:
-cleaner
Modified: gnunet/src/nse/nse_api.c
===================================================================
--- gnunet/src/nse/nse_api.c 2013-07-14 19:25:22 UTC (rev 28021)
+++ gnunet/src/nse/nse_api.c 2013-07-14 19:55:48 UTC (rev 28022)
@@ -173,11 +173,11 @@
struct GNUNET_MessageHeader *msg;
h->th = NULL;
- if (buf == NULL)
+ if (NULL == buf)
{
/* Connect error... */
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Shutdown while trying to transmit `%s' request.\n", "START");
+ "Error while trying to transmit `%s' request.\n", "START");
reschedule_connect (h);
return 0;
}
@@ -205,23 +205,18 @@
struct GNUNET_NSE_Handle *h = cls;
h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
- if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
- {
- /* shutdown, just give up */
- return;
- }
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Connecting to network size estimation service.\n");
- GNUNET_assert (h->client == NULL);
+ GNUNET_assert (NULL == h->client);
h->client = GNUNET_CLIENT_connect ("nse", h->cfg);
- GNUNET_assert (h->client != NULL);
-
+ GNUNET_assert (NULL != h->client);
+ GNUNET_assert (NULL == h->th);
h->th =
GNUNET_CLIENT_notify_transmit_ready (h->client,
sizeof (struct
GNUNET_MessageHeader),
GNUNET_TIME_UNIT_FOREVER_REL,
GNUNET_NO, &send_start, h);
- GNUNET_assert (h->th != NULL);
+ GNUNET_assert (NULL != h->th);
}
@@ -259,18 +254,18 @@
void
GNUNET_NSE_disconnect (struct GNUNET_NSE_Handle *h)
{
- GNUNET_assert (h != NULL);
+ GNUNET_assert (NULL != h);
if (h->reconnect_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (h->reconnect_task);
h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
}
- if (h->th != NULL)
+ if (NULL != h->th)
{
GNUNET_CLIENT_notify_transmit_ready_cancel (h->th);
h->th = NULL;
}
- if (h->client != NULL)
+ if (NULL != h->client)
{
GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28022 - gnunet/src/nse,
gnunet <=