[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35770 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35770 - gnunet/src/ats |
Date: |
Thu, 21 May 2015 14:24:19 +0200 |
Author: grothoff
Date: 2015-05-21 14:24:19 +0200 (Thu, 21 May 2015)
New Revision: 35770
Modified:
gnunet/src/ats/test_ats_api.c
gnunet/src/ats/test_ats_lib.c
Log:
-fix testcase
Modified: gnunet/src/ats/test_ats_api.c
===================================================================
--- gnunet/src/ats/test_ats_api.c 2015-05-21 11:54:52 UTC (rev 35769)
+++ gnunet/src/ats/test_ats_api.c 2015-05-21 12:24:19 UTC (rev 35770)
@@ -46,7 +46,7 @@
}
}
},
- /* adding same address again should fail */
+ /* 1: adding same address again should fail */
{
.code = CMD_ADD_ADDRESS,
.label = "add-address-0-0:FAIL",
@@ -60,7 +60,7 @@
.expect_fail = 1
}
},
- /* some solver still require explicit start */
+ /* 2: some solver still require explicit start */
{
.code = CMD_REQUEST_CONNECTION_START,
.label = "request-0",
@@ -68,7 +68,7 @@
.pid = 0
}
},
- /* check we got an address */
+ /* 3: check we got an address */
{
.code = CMD_AWAIT_ADDRESS_SUGGESTION,
.details.await_address_suggestion = {
@@ -75,7 +75,7 @@
.add_label = "add-address-0-0"
}
},
- /* check monitor also got the address */
+ /* 4: check monitor also got the address */
{
.code = CMD_AWAIT_ADDRESS_INFORMATION,
.details.await_address_information = {
@@ -82,7 +82,7 @@
.add_label = "add-address-0-0"
}
},
- /* test session API */
+ /* 5: test session API */
{
.code = CMD_ADD_SESSION,
.label = "add-session-0-0-1",
@@ -97,7 +97,7 @@
.add_session_label = "add-session-0-0-1",
}
},
- /* test preference API */
+ /* 7: test preference API */
{
.code = CMD_CHANGE_PREFERENCE,
.details.change_preference = {
@@ -113,7 +113,7 @@
/* FIXME: preference details */
}
},
- /* test sanity check address listing */
+ /* 9: test sanity check address listing */
{
.code = CMD_LIST_ADDRESSES,
.details.list_addresses = {
@@ -125,7 +125,7 @@
.max_active_calls = 1
}
},
- /* remove address testing */
+ /* 10: remove address testing */
{
.code = CMD_DEL_ADDRESS,
.details.del_address = {
@@ -132,7 +132,7 @@
.add_label = "add-address-0-0"
}
},
- /* check we got disconnected */
+ /* 11: check we got disconnected */
{
.code = CMD_AWAIT_DISCONNECT_SUGGESTION,
.details.await_disconnect_suggestion = {
@@ -139,7 +139,7 @@
.pid = 0
}
},
- /* just for symmetry, also stop asking for the connection */
+ /* 12: just for symmetry, also stop asking for the connection */
{
.code = CMD_REQUEST_CONNECTION_STOP,
.details.request_connection_stop = {
@@ -146,7 +146,7 @@
.connect_label = "request-0",
}
},
- /* add address again */
+ /* 13: add address again */
{
.code = CMD_ADD_ADDRESS,
.label = "add-address-0-0:1",
@@ -159,7 +159,7 @@
}
}
},
- /* some solver still require explicit start */
+ /* 14: some solver still require explicit start */
{
.code = CMD_REQUEST_CONNECTION_START,
.label = "request-0",
@@ -167,7 +167,7 @@
.pid = 0
}
},
- /* check we got an address */
+ /* 15: check we got an address */
{
.code = CMD_AWAIT_ADDRESS_SUGGESTION,
.details.await_address_suggestion = {
@@ -174,7 +174,7 @@
.add_label = "add-address-0-0:1"
}
},
- /* add alternative address */
+ /* 16: add alternative address */
{
.code = CMD_ADD_ADDRESS,
.label = "add-address-0-1",
@@ -187,7 +187,7 @@
}
}
},
- /* remove original address */
+ /* 17: remove original address */
{
.code = CMD_DEL_ADDRESS,
.details.del_address = {
@@ -194,7 +194,7 @@
.add_label = "add-address-0-0:1"
}
},
- /* check we switched to alternative address */
+ /* 18: check we switched to alternative address */
{
.code = CMD_AWAIT_ADDRESS_SUGGESTION,
.details.await_address_suggestion = {
@@ -201,7 +201,7 @@
.add_label = "add-address-0-1"
}
},
- /* remove alternative address */
+ /* 19: remove alternative address */
{
.code = CMD_DEL_ADDRESS,
.details.del_address = {
@@ -208,7 +208,7 @@
.add_label = "add-address-0-1"
}
},
- /* check we got disconnected */
+ /* 20: check we got disconnected */
{
.code = CMD_AWAIT_DISCONNECT_SUGGESTION,
.details.await_disconnect_suggestion = {
@@ -215,7 +215,7 @@
.pid = 0
}
},
- /* just for symmetry, also stop asking for the connection */
+ /* 21: just for symmetry, also stop asking for the connection */
{
.code = CMD_REQUEST_CONNECTION_STOP,
.details.request_connection_stop = {
Modified: gnunet/src/ats/test_ats_lib.c
===================================================================
--- gnunet/src/ats/test_ats_lib.c 2015-05-21 11:54:52 UTC (rev 35769)
+++ gnunet/src/ats/test_ats_lib.c 2015-05-21 12:24:19 UTC (rev 35770)
@@ -671,7 +671,7 @@
if (NULL == asd)
return;
if (GNUNET_NO == asd->active)
- return;
+ return; /* last suggestion was to disconnect, wait longer */
done = GNUNET_YES;
if (NULL != cmd->details.await_address_suggestion.add_label)
{
@@ -703,9 +703,10 @@
&pid);
asd = find_address_suggestion (&pid);
if (NULL == asd)
- return;
- if (GNUNET_NO == asd->active)
- return;
+ return; /* odd, no suggestion at all yet!? */
+ if (GNUNET_YES == asd->active)
+ return; /* last suggestion was to activate, wait longer */
+ /* last suggestion was to deactivate, condition satisfied! */
off++;
break;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35770 - gnunet/src/ats,
gnunet <=