diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-07-13 20:23:53 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-07-13 20:23:53 +0000 |
commit | b199b782b393d0fc04b5978edd69e36d6ae7ea64 (patch) | |
tree | 5b5f2c590f3e08240f734a255a8db15f413cfb65 /src/cadet/gnunet-service-cadet_connection.h | |
parent | 16d646a12f744c19e307c1c0139e3303a6263806 (diff) | |
download | gnunet-b199b782b393d0fc04b5978edd69e36d6ae7ea64.tar.gz gnunet-b199b782b393d0fc04b5978edd69e36d6ae7ea64.zip |
adding moderately expensive instrumentation to track down invariant violation #3846 in CADET
Diffstat (limited to 'src/cadet/gnunet-service-cadet_connection.h')
-rw-r--r-- | src/cadet/gnunet-service-cadet_connection.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.h b/src/cadet/gnunet-service-cadet_connection.h index b72536533..a6d0a7096 100644 --- a/src/cadet/gnunet-service-cadet_connection.h +++ b/src/cadet/gnunet-service-cadet_connection.h | |||
@@ -102,10 +102,14 @@ struct CadetConnectionQueue; | |||
102 | * @param fwd Was this a FWD going message? | 102 | * @param fwd Was this a FWD going message? |
103 | * @param size Size of the message. | 103 | * @param size Size of the message. |
104 | */ | 104 | */ |
105 | typedef void (*GCC_sent) (void *cls, | 105 | typedef void |
106 | struct CadetConnection *c, | 106 | (*GCC_sent) (void *cls, |
107 | struct CadetConnectionQueue *q, | 107 | struct CadetConnection *c, |
108 | uint16_t type, int fwd, size_t size); | 108 | struct CadetConnectionQueue *q, |
109 | uint16_t type, | ||
110 | int fwd, | ||
111 | size_t size); | ||
112 | |||
109 | 113 | ||
110 | /** | 114 | /** |
111 | * Core handler for connection creation. | 115 | * Core handler for connection creation. |
@@ -113,37 +117,38 @@ typedef void (*GCC_sent) (void *cls, | |||
113 | * @param cls Closure (unused). | 117 | * @param cls Closure (unused). |
114 | * @param peer Sender (neighbor). | 118 | * @param peer Sender (neighbor). |
115 | * @param message Message. | 119 | * @param message Message. |
116 | * | 120 | * @return #GNUNET_OK to keep the connection open, |
117 | * @return GNUNET_OK to keep the connection open, | 121 | * #GNUNET_SYSERR to close it (signal serious error) |
118 | * GNUNET_SYSERR to close it (signal serious error) | ||
119 | */ | 122 | */ |
120 | int | 123 | int |
121 | GCC_handle_create (void *cls, const struct GNUNET_PeerIdentity *peer, | 124 | GCC_handle_create (void *cls, |
125 | const struct GNUNET_PeerIdentity *peer, | ||
122 | const struct GNUNET_MessageHeader *message); | 126 | const struct GNUNET_MessageHeader *message); |
123 | 127 | ||
128 | |||
124 | /** | 129 | /** |
125 | * Core handler for path confirmations. | 130 | * Core handler for path confirmations. |
126 | * | 131 | * |
127 | * @param cls closure | 132 | * @param cls closure |
128 | * @param message message | 133 | * @param message message |
129 | * @param peer peer identity this notification is about | 134 | * @param peer peer identity this notification is about |
130 | * | 135 | * @return #GNUNET_OK to keep the connection open, |
131 | * @return GNUNET_OK to keep the connection open, | 136 | * #GNUNET_SYSERR to close it (signal serious error) |
132 | * GNUNET_SYSERR to close it (signal serious error) | ||
133 | */ | 137 | */ |
134 | int | 138 | int |
135 | GCC_handle_confirm (void *cls, const struct GNUNET_PeerIdentity *peer, | 139 | GCC_handle_confirm (void *cls, |
140 | const struct GNUNET_PeerIdentity *peer, | ||
136 | const struct GNUNET_MessageHeader *message); | 141 | const struct GNUNET_MessageHeader *message); |
137 | 142 | ||
143 | |||
138 | /** | 144 | /** |
139 | * Core handler for notifications of broken paths | 145 | * Core handler for notifications of broken paths |
140 | * | 146 | * |
141 | * @param cls Closure (unused). | 147 | * @param cls Closure (unused). |
142 | * @param id Peer identity of sending neighbor. | 148 | * @param id Peer identity of sending neighbor. |
143 | * @param message Message. | 149 | * @param message Message. |
144 | * | 150 | * @return #GNUNET_OK to keep the connection open, |
145 | * @return GNUNET_OK to keep the connection open, | 151 | * #GNUNET_SYSERR to close it (signal serious error) |
146 | * GNUNET_SYSERR to close it (signal serious error) | ||
147 | */ | 152 | */ |
148 | int | 153 | int |
149 | GCC_handle_broken (void* cls, | 154 | GCC_handle_broken (void* cls, |