aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport-testing-loggers2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/transport-testing-loggers2.c')
-rw-r--r--src/transport/transport-testing-loggers2.c81
1 files changed, 0 insertions, 81 deletions
diff --git a/src/transport/transport-testing-loggers2.c b/src/transport/transport-testing-loggers2.c
deleted file mode 100644
index e6c79b78a..000000000
--- a/src/transport/transport-testing-loggers2.c
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2016 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20/**
21 * @file transport-testing-loggers.c
22 * @brief convenience functions for logging common events in tests
23 * @author Christian Grothoff
24 */
25#include "platform.h"
26#include "transport-testing2.h"
27
28
29/**
30 * Log a connect event.
31 *
32 * @param cls NULL
33 * @param me peer that had the event
34 * @param other peer that connected.
35 */
36void
37GNUNET_TRANSPORT_TESTING_log_connect (void *cls,
38 struct
39 GNUNET_TRANSPORT_TESTING_PeerContext *me,
40 const struct GNUNET_PeerIdentity *other)
41{
42 char *ps;
43
44 ps = GNUNET_strdup (GNUNET_i2s (&me->id));
45 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
46 "Peer %s connected to %u (%s)!\n",
47 GNUNET_i2s (other),
48 me->no,
49 ps);
50 GNUNET_free (ps);
51}
52
53
54/**
55 * Log a disconnect event.
56 *
57 * @param cls NULL
58 * @param me peer that had the event
59 * @param other peer that disconnected.
60 */
61void
62GNUNET_TRANSPORT_TESTING_log_disconnect (void *cls,
63 struct
64 GNUNET_TRANSPORT_TESTING_PeerContext *
65 me,
66 const struct
67 GNUNET_PeerIdentity *other)
68{
69 char *ps;
70
71 ps = GNUNET_strdup (GNUNET_i2s (&me->id));
72 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
73 "Peer `%s' disconnected from %u (%s)!\n",
74 GNUNET_i2s (other),
75 me->no,
76 ps);
77 GNUNET_free (ps);
78}
79
80
81/* end of transport-testing-loggers.c */