[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37628 - gnunet/src/hostlist
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37628 - gnunet/src/hostlist |
Date: |
Sat, 30 Jul 2016 19:33:48 +0200 |
Author: grothoff
Date: 2016-07-30 19:33:48 +0200 (Sat, 30 Jul 2016)
New Revision: 37628
Modified:
gnunet/src/hostlist/test_gnunet_daemon_hostlist.c
gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
Log:
convert to new hello_get API
Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist.c
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist.c 2016-07-30 17:29:00 UTC
(rev 37627)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist.c 2016-07-30 17:33:48 UTC
(rev 37628)
@@ -27,6 +27,7 @@
#include "gnunet_arm_service.h"
#include "gnunet_transport_service.h"
#include "gnunet_transport_core_service.h"
+#include "gnunet_transport_hello_service.h"
/**
@@ -43,7 +44,7 @@
struct GNUNET_CONFIGURATION_Handle *cfg;
struct GNUNET_TRANSPORT_CoreHandle *th;
struct GNUNET_MessageHeader *hello;
- struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
+ struct GNUNET_TRANSPORT_HelloGetHandle *ghh;
struct GNUNET_OS_Process *arm_proc;
};
@@ -59,7 +60,7 @@
{
if (NULL != p1.ghh)
{
- GNUNET_TRANSPORT_get_hello_cancel (p1.ghh);
+ GNUNET_TRANSPORT_hello_get_cancel (p1.ghh);
p1.ghh = NULL;
}
GNUNET_TRANSPORT_core_disconnect (p1.th);
@@ -69,7 +70,7 @@
{
if (NULL != p2.ghh)
{
- GNUNET_TRANSPORT_get_hello_cancel (p2.ghh);
+ GNUNET_TRANSPORT_hello_get_cancel (p2.ghh);
p2.ghh = NULL;
}
GNUNET_TRANSPORT_core_disconnect (p2.th);
@@ -125,7 +126,7 @@
{
struct PeerContext *p = cls;
- GNUNET_TRANSPORT_get_hello_cancel (p->ghh);
+ GNUNET_TRANSPORT_hello_get_cancel (p->ghh);
p->ghh = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received HELLO, starting hostlist service.\n");
@@ -161,8 +162,9 @@
¬ify_connect,
NULL,
NULL);
- GNUNET_assert (p->th != NULL);
- p->ghh = GNUNET_TRANSPORT_get_hello (p->cfg,
+ GNUNET_assert (NULL != p->th);
+ p->ghh = GNUNET_TRANSPORT_hello_get (p->cfg,
+ GNUNET_TRANSPORT_AC_ANY,
&process_hello,
p);
GNUNET_free (binary);
Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c 2016-07-30
17:29:00 UTC (rev 37627)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c 2016-07-30
17:33:48 UTC (rev 37628)
@@ -27,6 +27,7 @@
#include "gnunet_util_lib.h"
#include "gnunet_arm_service.h"
#include "gnunet_transport_core_service.h"
+#include "gnunet_transport_hello_service.h"
/**
* How long until we give up on transmitting the message?
@@ -42,7 +43,7 @@
struct GNUNET_CONFIGURATION_Handle *cfg;
struct GNUNET_TRANSPORT_CoreHandle *th;
struct GNUNET_MessageHeader *hello;
- struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
+ struct GNUNET_TRANSPORT_HelloGetHandle *ghh;
struct GNUNET_OS_Process *arm_proc;
};
@@ -73,7 +74,7 @@
* @param mq message queue to send to @a peer
* @return NULL
*/
-static void
+static void *
notify_connect (void *cls,
const struct GNUNET_PeerIdentity *peer,
struct GNUNET_MQ_Handle *mq)
@@ -92,7 +93,7 @@
{
struct PeerContext *p = cls;
- GNUNET_TRANSPORT_get_hello_cancel (p->ghh);
+ GNUNET_TRANSPORT_hello_get_cancel (p->ghh);
p->ghh = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received HELLO, starting hostlist service.\n");
@@ -129,7 +130,8 @@
NULL,
NULL);
GNUNET_assert (NULL != p->th);
- p->ghh = GNUNET_TRANSPORT_get_hello (p->cfg,
+ p->ghh = GNUNET_TRANSPORT_hello_get (p->cfg,
+ GNUNET_TRANSPORT_AC_ANY,
&process_hello,
p);
GNUNET_free (binary);
@@ -184,7 +186,7 @@
}
if (NULL != p1.ghh)
{
- GNUNET_TRANSPORT_get_hello_cancel (p1.ghh);
+ GNUNET_TRANSPORT_hello_get_cancel (p1.ghh);
p1.ghh = NULL;
}
if (NULL != p1.th)
@@ -194,7 +196,7 @@
}
if (NULL != p2.ghh)
{
- GNUNET_TRANSPORT_get_hello_cancel (p2.ghh);
+ GNUNET_TRANSPORT_hello_get_cancel (p2.ghh);
p2.ghh = NULL;
}
if (NULL != p2.th)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37628 - gnunet/src/hostlist,
gnunet <=