aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/test_gnunet_daemon_hostlist.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-23 22:24:50 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-23 22:24:50 +0000
commitd30c25b427875a16cc46cfd091f595f119e570bc (patch)
tree7e421bfae7f6efc16834816d30c81356d3c5b041 /src/hostlist/test_gnunet_daemon_hostlist.c
parent8e6c69b6322f9d3f3f2a32040431a3b056302132 (diff)
downloadgnunet-d30c25b427875a16cc46cfd091f595f119e570bc.tar.gz
gnunet-d30c25b427875a16cc46cfd091f595f119e570bc.zip
-LRN: Change logskipping to use functions only:
Remember these weird "skip_log" functions in my gdb backtraces? I hope that this patch will get rid of them. Shouldn't affect existing uses of the API.
Diffstat (limited to 'src/hostlist/test_gnunet_daemon_hostlist.c')
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c
index f13f86dfa..5f07ce415 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist.c
@@ -27,10 +27,6 @@
27#include "gnunet_arm_service.h" 27#include "gnunet_arm_service.h"
28#include "gnunet_transport_service.h" 28#include "gnunet_transport_service.h"
29 29
30#define VERBOSE GNUNET_NO
31
32#define START_ARM GNUNET_YES
33
34 30
35/** 31/**
36 * How long until we give up on transmitting the message? 32 * How long until we give up on transmitting the message?
@@ -47,9 +43,7 @@ struct PeerContext
47 struct GNUNET_TRANSPORT_Handle *th; 43 struct GNUNET_TRANSPORT_Handle *th;
48 struct GNUNET_MessageHeader *hello; 44 struct GNUNET_MessageHeader *hello;
49 struct GNUNET_TRANSPORT_GetHelloHandle *ghh; 45 struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
50#if START_ARM
51 struct GNUNET_OS_Process *arm_proc; 46 struct GNUNET_OS_Process *arm_proc;
52#endif
53}; 47};
54 48
55static struct PeerContext p1; 49static struct PeerContext p1;
@@ -138,12 +132,10 @@ static void
138setup_peer (struct PeerContext *p, const char *cfgname) 132setup_peer (struct PeerContext *p, const char *cfgname)
139{ 133{
140 p->cfg = GNUNET_CONFIGURATION_create (); 134 p->cfg = GNUNET_CONFIGURATION_create ();
141#if START_ARM
142 p->arm_proc = 135 p->arm_proc =
143 GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm", 136 GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm",
144 "gnunet-service-arm", 137 "gnunet-service-arm",
145 "-c", cfgname, NULL); 138 "-c", cfgname, NULL);
146#endif
147 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); 139 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
148 p->th = 140 p->th =
149 GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, &notify_connect, NULL); 141 GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, &notify_connect, NULL);
@@ -157,7 +149,6 @@ waitpid_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
157{ 149{
158 struct PeerContext *p = cls; 150 struct PeerContext *p = cls;
159 151
160#if START_ARM
161 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Killing ARM process.\n"); 152 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Killing ARM process.\n");
162 if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) 153 if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
163 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); 154 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
@@ -167,7 +158,6 @@ waitpid_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
167 GNUNET_OS_process_get_pid (p->arm_proc)); 158 GNUNET_OS_process_get_pid (p->arm_proc));
168 GNUNET_OS_process_destroy (p->arm_proc); 159 GNUNET_OS_process_destroy (p->arm_proc);
169 p->arm_proc = NULL; 160 p->arm_proc = NULL;
170#endif
171 GNUNET_CONFIGURATION_destroy (p->cfg); 161 GNUNET_CONFIGURATION_destroy (p->cfg);
172} 162}
173 163