[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11249 - gnunet/src/arm
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11249 - gnunet/src/arm |
Date: |
Fri, 7 May 2010 11:42:24 +0200 |
Author: grothoff
Date: 2010-05-07 11:42:24 +0200 (Fri, 07 May 2010)
New Revision: 11249
Modified:
gnunet/src/arm/test_arm_api.c
Log:
make error more robust
Modified: gnunet/src/arm/test_arm_api.c
===================================================================
--- gnunet/src/arm/test_arm_api.c 2010-05-07 09:19:18 UTC (rev 11248)
+++ gnunet/src/arm/test_arm_api.c 2010-05-07 09:42:24 UTC (rev 11249)
@@ -49,9 +49,9 @@
static void
arm_stopped (void *cls, int success)
{
- if (success != GNUNET_NO)
- ok = 1;
- else
+ if (success != GNUNET_NO)
+ ok = 3;
+ else if (ok == 1)
ok = 0;
}
@@ -70,7 +70,11 @@
{
if (addr == NULL)
{
- GNUNET_assert (ok == 0);
+ if (ok != 0)
+ {
+ GNUNET_break (0);
+ ok = 2;
+ }
GNUNET_ARM_stop_service (arm, "resolver", TIMEOUT, &arm_notify_stop,
NULL);
return;
}
@@ -82,7 +86,15 @@
static void
resolver_notify (void *cls, int success)
{
- GNUNET_assert (success == GNUNET_YES);
+ if (success != GNUNET_YES)
+ {
+ GNUNET_break (0);
+ ok = 2;
+#if START_ARM
+ GNUNET_ARM_stop_service (arm, "arm", TIMEOUT, &arm_stopped, NULL);
+#endif
+ return;
+ }
GNUNET_RESOLVER_ip_get (sched,
cfg,
"localhost", AF_INET, TIMEOUT, &dns_notify, NULL);
@@ -92,7 +104,14 @@
static void
arm_notify (void *cls, int success)
{
- GNUNET_assert (success == GNUNET_YES);
+ if (success != GNUNET_YES)
+ {
+ GNUNET_break (0);
+ ok = 2;
+#if START_ARM
+ GNUNET_ARM_stop_service (arm, "arm", TIMEOUT, &arm_stopped, NULL);
+#endif
+ }
GNUNET_ARM_start_service (arm, "resolver", START_TIMEOUT, &resolver_notify,
NULL);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11249 - gnunet/src/arm,
gnunet <=