aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/chat/gnunet-service-chat.c35
-rw-r--r--src/core/core_api.c10
-rw-r--r--src/core/core_api_is_connected.c14
-rw-r--r--src/core/core_api_iterate_peers.c9
-rw-r--r--src/core/gnunet-core.c9
-rw-r--r--src/core/test_core_api.c16
-rw-r--r--src/core/test_core_api_reliability.c16
-rw-r--r--src/core/test_core_api_send_to_self.c6
-rw-r--r--src/core/test_core_api_start_only.c12
-rw-r--r--src/core/test_core_quota_compliance.c16
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c16
-rw-r--r--src/fs/gnunet-service-fs.c21
-rw-r--r--src/fs/gnunet-service-fs_cp.c7
-rw-r--r--src/fs/gnunet-service-fs_cp.h4
-rw-r--r--src/include/gnunet_core_service.h13
15 files changed, 60 insertions, 144 deletions
diff --git a/src/chat/gnunet-service-chat.c b/src/chat/gnunet-service-chat.c
index ec988e8fd..e01143cf7 100644
--- a/src/chat/gnunet-service-chat.c
+++ b/src/chat/gnunet-service-chat.c
@@ -979,17 +979,14 @@ handle_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client)
979 * @param cls closure, always NULL 979 * @param cls closure, always NULL
980 * @param other the other peer involved 980 * @param other the other peer involved
981 * @param message the actual message 981 * @param message the actual message
982 * @param atsi performance information 982
983 * @param atsi_count number of entries in atsi
984 * @return GNUNET_OK to keep the connection open, 983 * @return GNUNET_OK to keep the connection open,
985 * GNUNET_SYSERR to close it (signal serious error) 984 * GNUNET_SYSERR to close it (signal serious error)
986 */ 985 */
987static int 986static int
988handle_p2p_join_notification (void *cls, 987handle_p2p_join_notification (void *cls,
989 const struct GNUNET_PeerIdentity *other, 988 const struct GNUNET_PeerIdentity *other,
990 const struct GNUNET_MessageHeader *message, 989 const struct GNUNET_MessageHeader *message)
991 const struct GNUNET_ATS_Information *atsi,
992 unsigned int atsi_count)
993{ 990{
994 const struct P2PJoinNotificationMessage *p2p_jnmsg; 991 const struct P2PJoinNotificationMessage *p2p_jnmsg;
995 char *room_name; 992 char *room_name;
@@ -1096,17 +1093,13 @@ handle_p2p_join_notification (void *cls,
1096 * @param cls closure, always NULL 1093 * @param cls closure, always NULL
1097 * @param other the other peer involved 1094 * @param other the other peer involved
1098 * @param message the actual message 1095 * @param message the actual message
1099 * @param atsi performance information
1100 * @param atsi_count number of entries in atsi
1101 * @return GNUNET_OK to keep the connection open, 1096 * @return GNUNET_OK to keep the connection open,
1102 * GNUNET_SYSERR to close it (signal serious error) 1097 * GNUNET_SYSERR to close it (signal serious error)
1103 */ 1098 */
1104static int 1099static int
1105handle_p2p_leave_notification (void *cls, 1100handle_p2p_leave_notification (void *cls,
1106 const struct GNUNET_PeerIdentity *other, 1101 const struct GNUNET_PeerIdentity *other,
1107 const struct GNUNET_MessageHeader *message, 1102 const struct GNUNET_MessageHeader *message)
1108 const struct GNUNET_ATS_Information *atsi,
1109 unsigned int atsi_count)
1110{ 1103{
1111 const struct P2PLeaveNotificationMessage *p2p_lnmsg; 1104 const struct P2PLeaveNotificationMessage *p2p_lnmsg;
1112 struct GNUNET_HashCode id; 1105 struct GNUNET_HashCode id;
@@ -1178,17 +1171,13 @@ handle_p2p_leave_notification (void *cls,
1178 * @param cls closure, always NULL 1171 * @param cls closure, always NULL
1179 * @param other the other peer involved 1172 * @param other the other peer involved
1180 * @param message the actual message 1173 * @param message the actual message
1181 * @param atsi performance information
1182 * @param atsi_count number of entries in atsi
1183 * @return GNUNET_OK to keep the connection open, 1174 * @return GNUNET_OK to keep the connection open,
1184 * GNUNET_SYSERR to close it (signal serious error) 1175 * GNUNET_SYSERR to close it (signal serious error)
1185 */ 1176 */
1186static int 1177static int
1187handle_p2p_message_notification (void *cls, 1178handle_p2p_message_notification (void *cls,
1188 const struct GNUNET_PeerIdentity *other, 1179 const struct GNUNET_PeerIdentity *other,
1189 const struct GNUNET_MessageHeader *message, 1180 const struct GNUNET_MessageHeader *message)
1190 const struct GNUNET_ATS_Information *atsi,
1191 unsigned int atsi_count)
1192{ 1181{
1193 const struct P2PReceiveNotificationMessage *p2p_rnmsg; 1182 const struct P2PReceiveNotificationMessage *p2p_rnmsg;
1194 struct P2PReceiveNotificationMessage *my_p2p_rnmsg; 1183 struct P2PReceiveNotificationMessage *my_p2p_rnmsg;
@@ -1330,16 +1319,12 @@ handle_p2p_message_notification (void *cls,
1330 * @param cls closure, always NULL 1319 * @param cls closure, always NULL
1331 * @param other the other peer involved 1320 * @param other the other peer involved
1332 * @param message the actual message 1321 * @param message the actual message
1333 * @param atsi performance information
1334 * @param atsi_count number of entries in atsi
1335 * @return GNUNET_OK to keep the connection open, 1322 * @return GNUNET_OK to keep the connection open,
1336 * GNUNET_SYSERR to close it (signal serious error) 1323 * GNUNET_SYSERR to close it (signal serious error)
1337 */ 1324 */
1338static int 1325static int
1339handle_p2p_sync_request (void *cls, const struct GNUNET_PeerIdentity *other, 1326handle_p2p_sync_request (void *cls, const struct GNUNET_PeerIdentity *other,
1340 const struct GNUNET_MessageHeader *message, 1327 const struct GNUNET_MessageHeader *message)
1341 const struct GNUNET_ATS_Information *atsi,
1342 unsigned int atsi_count)
1343{ 1328{
1344 struct ChatClient *entry; 1329 struct ChatClient *entry;
1345 struct GNUNET_CORE_TransmitHandle *th; 1330 struct GNUNET_CORE_TransmitHandle *th;
@@ -1381,9 +1366,7 @@ handle_p2p_sync_request (void *cls, const struct GNUNET_PeerIdentity *other,
1381static int 1366static int
1382handle_p2p_confirmation_receipt (void *cls, 1367handle_p2p_confirmation_receipt (void *cls,
1383 const struct GNUNET_PeerIdentity *other, 1368 const struct GNUNET_PeerIdentity *other,
1384 const struct GNUNET_MessageHeader *message, 1369 const struct GNUNET_MessageHeader *message)
1385 const struct GNUNET_ATS_Information *atsi,
1386 unsigned int atsi_count)
1387{ 1370{
1388 const struct P2PConfirmationReceiptMessage *p2p_crmsg; 1371 const struct P2PConfirmationReceiptMessage *p2p_crmsg;
1389 struct P2PConfirmationReceiptMessage *my_p2p_crmsg; 1372 struct P2PConfirmationReceiptMessage *my_p2p_crmsg;
@@ -1519,13 +1502,9 @@ transmit_sync_request_to_peer (void *cls, size_t size, void *buf)
1519 * 1502 *
1520 * @param cls closure 1503 * @param cls closure
1521 * @param peer peer identity this notification is about 1504 * @param peer peer identity this notification is about
1522 * @param atsi performance data
1523 * @param atsi_count number of entries in atsi
1524 */ 1505 */
1525static void 1506static void
1526peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, 1507peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer)
1527 const struct GNUNET_ATS_Information *atsi,
1528 unsigned int atsi_count)
1529{ 1508{
1530 struct ConnectedPeer *cp; 1509 struct ConnectedPeer *cp;
1531 struct GNUNET_CORE_TransmitHandle *th; 1510 struct GNUNET_CORE_TransmitHandle *th;
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 511c7ee99..a123a3a26 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -800,7 +800,7 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
800 &h->me.hashPubKey, pr, 800 &h->me.hashPubKey, pr,
801 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)); 801 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST));
802 if (NULL != h->connects) 802 if (NULL != h->connects)
803 h->connects (h->cls, &h->me, NULL, 0); 803 h->connects (h->cls, &h->me);
804 break; 804 break;
805 case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT: 805 case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT:
806 if (msize < sizeof (struct ConnectNotifyMessage)) 806 if (msize < sizeof (struct ConnectNotifyMessage))
@@ -841,7 +841,7 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
841 &cnm->peer.hashPubKey, pr, 841 &cnm->peer.hashPubKey, pr,
842 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)); 842 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST));
843 if (NULL != h->connects) 843 if (NULL != h->connects)
844 h->connects (h->cls, &cnm->peer, NULL, 0); 844 h->connects (h->cls, &cnm->peer);
845 break; 845 break;
846 case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT: 846 case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT:
847 if (msize != sizeof (struct DisconnectNotifyMessage)) 847 if (msize != sizeof (struct DisconnectNotifyMessage))
@@ -924,14 +924,14 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
924 return; 924 return;
925 } 925 }
926 if (GNUNET_OK != 926 if (GNUNET_OK !=
927 h->handlers[hpos].callback (h->cls, &ntm->peer, em, NULL,0)) 927 h->handlers[hpos].callback (h->cls, &ntm->peer, em))
928 { 928 {
929 /* error in processing, do not process other messages! */ 929 /* error in processing, do not process other messages! */
930 break; 930 break;
931 } 931 }
932 } 932 }
933 if (NULL != h->inbound_notify) 933 if (NULL != h->inbound_notify)
934 h->inbound_notify (h->cls, &ntm->peer, em, NULL, 0); 934 h->inbound_notify (h->cls, &ntm->peer, em);
935 break; 935 break;
936 case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND: 936 case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND:
937 if (msize < sizeof (struct NotifyTrafficMessage)) 937 if (msize < sizeof (struct NotifyTrafficMessage))
@@ -966,7 +966,7 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
966 GNUNET_break (0); 966 GNUNET_break (0);
967 break; 967 break;
968 } 968 }
969 h->outbound_notify (h->cls, &ntm->peer, em, NULL, 0); 969 h->outbound_notify (h->cls, &ntm->peer, em);
970 break; 970 break;
971 case GNUNET_MESSAGE_TYPE_CORE_SEND_READY: 971 case GNUNET_MESSAGE_TYPE_CORE_SEND_READY:
972 if (msize != sizeof (struct SendMessageReady)) 972 if (msize != sizeof (struct SendMessageReady))
diff --git a/src/core/core_api_is_connected.c b/src/core/core_api_is_connected.c
index 10af88f5c..31edb94b4 100644
--- a/src/core/core_api_is_connected.c
+++ b/src/core/core_api_is_connected.c
@@ -83,7 +83,7 @@ receive_connect_info (void *cls, const struct GNUNET_MessageHeader *msg)
83 if (NULL == msg) 83 if (NULL == msg)
84 { 84 {
85 /* core died, failure */ 85 /* core died, failure */
86 cth->peer_cb (cth->cb_cls, NULL, NULL, 0); 86 cth->peer_cb (cth->cb_cls, NULL);
87 GNUNET_CORE_is_peer_connected_cancel (cth); 87 GNUNET_CORE_is_peer_connected_cancel (cth);
88 return; 88 return;
89 } 89 }
@@ -91,7 +91,7 @@ receive_connect_info (void *cls, const struct GNUNET_MessageHeader *msg)
91 (ntohs (msg->size) == sizeof (struct GNUNET_MessageHeader))) 91 (ntohs (msg->size) == sizeof (struct GNUNET_MessageHeader)))
92 { 92 {
93 /* end of transmissions */ 93 /* end of transmissions */
94 cth->peer_cb (cth->cb_cls, NULL, NULL, 0); 94 cth->peer_cb (cth->cb_cls, NULL);
95 GNUNET_CORE_is_peer_connected_cancel (cth); 95 GNUNET_CORE_is_peer_connected_cancel (cth);
96 return; 96 return;
97 } 97 }
@@ -101,7 +101,7 @@ receive_connect_info (void *cls, const struct GNUNET_MessageHeader *msg)
101 (msize < sizeof (struct ConnectNotifyMessage))) 101 (msize < sizeof (struct ConnectNotifyMessage)))
102 { 102 {
103 GNUNET_break (0); 103 GNUNET_break (0);
104 cth->peer_cb (cth->cb_cls, NULL, NULL, 0); 104 cth->peer_cb (cth->cb_cls, NULL);
105 GNUNET_CORE_is_peer_connected_cancel (cth); 105 GNUNET_CORE_is_peer_connected_cancel (cth);
106 return; 106 return;
107 } 107 }
@@ -109,12 +109,12 @@ receive_connect_info (void *cls, const struct GNUNET_MessageHeader *msg)
109 if (msize != sizeof (struct ConnectNotifyMessage)) 109 if (msize != sizeof (struct ConnectNotifyMessage))
110 { 110 {
111 GNUNET_break (0); 111 GNUNET_break (0);
112 cth->peer_cb (cth->cb_cls, NULL, NULL, 0); 112 cth->peer_cb (cth->cb_cls, NULL);
113 GNUNET_CORE_is_peer_connected_cancel (cth); 113 GNUNET_CORE_is_peer_connected_cancel (cth);
114 return; 114 return;
115 } 115 }
116 /* Normal case */ 116 /* Normal case */
117 cth->peer_cb (cth->cb_cls, &connect_message->peer, NULL, 0); 117 cth->peer_cb (cth->cb_cls, &connect_message->peer);
118 GNUNET_CLIENT_receive (cth->client, &receive_connect_info, 118 GNUNET_CLIENT_receive (cth->client, &receive_connect_info,
119 cth, GNUNET_TIME_UNIT_FOREVER_REL); 119 cth, GNUNET_TIME_UNIT_FOREVER_REL);
120} 120}
@@ -144,9 +144,7 @@ transmit_is_connected_request (void *cls, size_t size, void *buf)
144 sizeof (struct GNUNET_PeerIdentity); 144 sizeof (struct GNUNET_PeerIdentity);
145 if ( (NULL == buf) || (0 == size) ) 145 if ( (NULL == buf) || (0 == size) )
146 { 146 {
147 cth->peer_cb (cth->cb_cls, 147 cth->peer_cb (cth->cb_cls, NULL);
148 NULL,
149 NULL, 0);
150 GNUNET_CLIENT_disconnect (cth->client); 148 GNUNET_CLIENT_disconnect (cth->client);
151 GNUNET_free (cth); 149 GNUNET_free (cth);
152 return 0; 150 return 0;
diff --git a/src/core/core_api_iterate_peers.c b/src/core/core_api_iterate_peers.c
index 4cb73dc21..cc3db6476 100644
--- a/src/core/core_api_iterate_peers.c
+++ b/src/core/core_api_iterate_peers.c
@@ -78,7 +78,7 @@ receive_info (void *cls, const struct GNUNET_MessageHeader *msg)
78 (ntohs (msg->size) == sizeof (struct GNUNET_MessageHeader)))) 78 (ntohs (msg->size) == sizeof (struct GNUNET_MessageHeader))))
79 { 79 {
80 if (request_context->peer_cb != NULL) 80 if (request_context->peer_cb != NULL)
81 request_context->peer_cb (request_context->cb_cls, NULL, NULL, 0); 81 request_context->peer_cb (request_context->cb_cls, NULL);
82 GNUNET_CLIENT_disconnect (request_context->client); 82 GNUNET_CLIENT_disconnect (request_context->client);
83 GNUNET_free (request_context); 83 GNUNET_free (request_context);
84 return; 84 return;
@@ -91,7 +91,7 @@ receive_info (void *cls, const struct GNUNET_MessageHeader *msg)
91 { 91 {
92 GNUNET_break (0); 92 GNUNET_break (0);
93 if (request_context->peer_cb != NULL) 93 if (request_context->peer_cb != NULL)
94 request_context->peer_cb (request_context->cb_cls, NULL, NULL, 0); 94 request_context->peer_cb (request_context->cb_cls, NULL);
95 GNUNET_CLIENT_disconnect (request_context->client); 95 GNUNET_CLIENT_disconnect (request_context->client);
96 GNUNET_free (request_context); 96 GNUNET_free (request_context);
97 return; 97 return;
@@ -101,15 +101,14 @@ receive_info (void *cls, const struct GNUNET_MessageHeader *msg)
101 { 101 {
102 GNUNET_break (0); 102 GNUNET_break (0);
103 if (request_context->peer_cb != NULL) 103 if (request_context->peer_cb != NULL)
104 request_context->peer_cb (request_context->cb_cls, NULL, NULL, 0); 104 request_context->peer_cb (request_context->cb_cls, NULL);
105 GNUNET_CLIENT_disconnect (request_context->client); 105 GNUNET_CLIENT_disconnect (request_context->client);
106 GNUNET_free (request_context); 106 GNUNET_free (request_context);
107 return; 107 return;
108 } 108 }
109 /* Normal case */ 109 /* Normal case */
110 if (request_context->peer_cb != NULL) 110 if (request_context->peer_cb != NULL)
111 request_context->peer_cb (request_context->cb_cls, &connect_message->peer, 111 request_context->peer_cb (request_context->cb_cls, &connect_message->peer);
112 NULL , 0);
113 GNUNET_CLIENT_receive (request_context->client, &receive_info, 112 GNUNET_CLIENT_receive (request_context->client, &receive_info,
114 request_context, GNUNET_TIME_UNIT_FOREVER_REL); 113 request_context, GNUNET_TIME_UNIT_FOREVER_REL);
115} 114}
diff --git a/src/core/gnunet-core.c b/src/core/gnunet-core.c
index 17b840480..87a372f30 100644
--- a/src/core/gnunet-core.c
+++ b/src/core/gnunet-core.c
@@ -74,9 +74,7 @@ shutdown_task (void *cls,
74 * @param atsi_count number of records in 'atsi' 74 * @param atsi_count number of records in 'atsi'
75 */ 75 */
76static void 76static void
77connected_peer_callback (void *cls, const struct GNUNET_PeerIdentity *peer, 77connected_peer_callback (void *cls, const struct GNUNET_PeerIdentity *peer)
78 const struct GNUNET_ATS_Information *atsi,
79 unsigned int atsi_count)
80{ 78{
81 struct GNUNET_CRYPTO_HashAsciiEncoded enc; 79 struct GNUNET_CRYPTO_HashAsciiEncoded enc;
82 80
@@ -102,12 +100,9 @@ monitor_notify_startup (void *cls,
102 * 100 *
103 * @param cls closure 101 * @param cls closure
104 * @param peer the peer that connected 102 * @param peer the peer that connected
105 * @param ats performance data
106 * @param ats_count number of entries in ats (excluding 0-termination)
107 */ 103 */
108static void 104static void
109monitor_notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 105monitor_notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
110 const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
111{ 106{
112 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get(); 107 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get();
113 const char *now_str; 108 const char *now_str;
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c
index ab96fb47e..c7865dd11 100644
--- a/src/core/test_core_api.c
+++ b/src/core/test_core_api.c
@@ -153,9 +153,7 @@ transmit_ready (void *cls, size_t size, void *buf)
153 153
154 154
155static void 155static void
156connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, 156connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
157 const struct GNUNET_ATS_Information *atsi,
158 unsigned int atsi_count)
159{ 157{
160 struct PeerContext *pc = cls; 158 struct PeerContext *pc = cls;
161 159
@@ -207,9 +205,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
207 205
208static int 206static int
209inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, 207inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
210 const struct GNUNET_MessageHeader *message, 208 const struct GNUNET_MessageHeader *message)
211 const struct GNUNET_ATS_Information *atsi,
212 unsigned int atsi_count)
213{ 209{
214 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 210 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
215 "Core provides inbound data from `%4s'.\n", GNUNET_i2s (other)); 211 "Core provides inbound data from `%4s'.\n", GNUNET_i2s (other));
@@ -219,9 +215,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
219 215
220static int 216static int
221outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, 217outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
222 const struct GNUNET_MessageHeader *message, 218 const struct GNUNET_MessageHeader *message)
223 const struct GNUNET_ATS_Information *atsi,
224 unsigned int atsi_count)
225{ 219{
226 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 220 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
227 "Core notifies about outbound data for `%4s'.\n", 221 "Core notifies about outbound data for `%4s'.\n",
@@ -233,9 +227,7 @@ outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
233 227
234static int 228static int
235process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, 229process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
236 const struct GNUNET_MessageHeader *message, 230 const struct GNUNET_MessageHeader *message)
237 const struct GNUNET_ATS_Information *atsi,
238 unsigned int atsi_count)
239{ 231{
240 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving message from `%4s'.\n", 232 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving message from `%4s'.\n",
241 GNUNET_i2s (peer)); 233 GNUNET_i2s (peer));
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c
index 061158d71..47ade350c 100644
--- a/src/core/test_core_api_reliability.c
+++ b/src/core/test_core_api_reliability.c
@@ -231,9 +231,7 @@ transmit_ready (void *cls, size_t size, void *buf)
231 231
232 232
233static void 233static void
234connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, 234connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
235 const struct GNUNET_ATS_Information *atsi,
236 unsigned int atsi_count)
237{ 235{
238 struct PeerContext *pc = cls; 236 struct PeerContext *pc = cls;
239 237
@@ -277,9 +275,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
277 275
278static int 276static int
279inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, 277inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
280 const struct GNUNET_MessageHeader *message, 278 const struct GNUNET_MessageHeader *message)
281 const struct GNUNET_ATS_Information *atsi,
282 unsigned int atsi_count)
283{ 279{
284 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 280 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
285 "Core provides inbound data from `%4s'.\n", GNUNET_i2s (other)); 281 "Core provides inbound data from `%4s'.\n", GNUNET_i2s (other));
@@ -289,9 +285,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
289 285
290static int 286static int
291outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, 287outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
292 const struct GNUNET_MessageHeader *message, 288 const struct GNUNET_MessageHeader *message)
293 const struct GNUNET_ATS_Information *atsi,
294 unsigned int atsi_count)
295{ 289{
296 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 290 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
297 "Core notifies about outbound data for `%4s'.\n", 291 "Core notifies about outbound data for `%4s'.\n",
@@ -306,9 +300,7 @@ transmit_ready (void *cls, size_t size, void *buf);
306 300
307static int 301static int
308process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, 302process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
309 const struct GNUNET_MessageHeader *message, 303 const struct GNUNET_MessageHeader *message)
310 const struct GNUNET_ATS_Information *atsi,
311 unsigned int atsi_count)
312{ 304{
313 static int n; 305 static int n;
314 unsigned int s; 306 unsigned int s;
diff --git a/src/core/test_core_api_send_to_self.c b/src/core/test_core_api_send_to_self.c
index c56e227e5..82048ea92 100644
--- a/src/core/test_core_api_send_to_self.c
+++ b/src/core/test_core_api_send_to_self.c
@@ -71,8 +71,7 @@ cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tskctx)
71 71
72static int 72static int
73receive (void *cls, const struct GNUNET_PeerIdentity *other, 73receive (void *cls, const struct GNUNET_PeerIdentity *other,
74 const struct GNUNET_MessageHeader *message, 74 const struct GNUNET_MessageHeader *message)
75 const struct GNUNET_ATS_Information *atsi, unsigned int atsi_count)
76{ 75{
77 if (die_task != GNUNET_SCHEDULER_NO_TASK) 76 if (die_task != GNUNET_SCHEDULER_NO_TASK)
78 GNUNET_SCHEDULER_cancel (die_task); 77 GNUNET_SCHEDULER_cancel (die_task);
@@ -120,8 +119,7 @@ init (void *cls, struct GNUNET_CORE_Handle *core,
120 119
121 120
122static void 121static void
123connect_cb (void *cls, const struct GNUNET_PeerIdentity *peer, 122connect_cb (void *cls, const struct GNUNET_PeerIdentity *peer)
124 const struct GNUNET_ATS_Information *atsi, unsigned int atsi_count)
125{ 123{
126 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected to peer %s.\n", 124 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected to peer %s.\n",
127 GNUNET_i2s (peer)); 125 GNUNET_i2s (peer));
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c
index d9cb4150d..e98b374d2 100644
--- a/src/core/test_core_api_start_only.c
+++ b/src/core/test_core_api_start_only.c
@@ -60,9 +60,7 @@ static int ok;
60 60
61 61
62static void 62static void
63connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, 63connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
64 const struct GNUNET_ATS_Information *atsi,
65 unsigned int atsi_count)
66{ 64{
67} 65}
68 66
@@ -75,9 +73,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
75 73
76static int 74static int
77inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, 75inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
78 const struct GNUNET_MessageHeader *message, 76 const struct GNUNET_MessageHeader *message)
79 const struct GNUNET_ATS_Information *atsi,
80 unsigned int atsi_count)
81{ 77{
82 return GNUNET_OK; 78 return GNUNET_OK;
83} 79}
@@ -85,9 +81,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
85 81
86static int 82static int
87outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, 83outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
88 const struct GNUNET_MessageHeader *message, 84 const struct GNUNET_MessageHeader *message)
89 const struct GNUNET_ATS_Information *atsi,
90 unsigned int atsi_count)
91{ 85{
92 return GNUNET_OK; 86 return GNUNET_OK;
93} 87}
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c
index 884d5fa5e..e09417642 100644
--- a/src/core/test_core_quota_compliance.c
+++ b/src/core/test_core_quota_compliance.c
@@ -360,9 +360,7 @@ transmit_ready (void *cls, size_t size, void *buf)
360 360
361 361
362static void 362static void
363connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, 363connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
364 const struct GNUNET_ATS_Information *atsi,
365 unsigned int atsi_count)
366{ 364{
367 struct PeerContext *pc = cls; 365 struct PeerContext *pc = cls;
368 366
@@ -425,9 +423,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
425 423
426static int 424static int
427inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, 425inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
428 const struct GNUNET_MessageHeader *message, 426 const struct GNUNET_MessageHeader *message)
429 const struct GNUNET_ATS_Information *atsi,
430 unsigned int atsi_count)
431{ 427{
432 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 428 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
433 "Core provides inbound data from `%4s' %llu.\n", 429 "Core provides inbound data from `%4s' %llu.\n",
@@ -439,9 +435,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
439 435
440static int 436static int
441outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, 437outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
442 const struct GNUNET_MessageHeader *message, 438 const struct GNUNET_MessageHeader *message)
443 const struct GNUNET_ATS_Information *atsi,
444 unsigned int atsi_count)
445{ 439{
446 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 440 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
447 "Core notifies about outbound data for `%4s'.\n", 441 "Core notifies about outbound data for `%4s'.\n",
@@ -455,9 +449,7 @@ transmit_ready (void *cls, size_t size, void *buf);
455 449
456static int 450static int
457process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, 451process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
458 const struct GNUNET_MessageHeader *message, 452 const struct GNUNET_MessageHeader *message)
459 const struct GNUNET_ATS_Information *atsi,
460 unsigned int atsi_count)
461{ 453{
462 static int n; 454 static int n;
463 const struct TestMessage *hdr; 455 const struct TestMessage *hdr;
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index 12eebe753..6c52ab342 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -626,9 +626,7 @@ send_find_peer_message (void *cls,
626 * @param atsi_count number of records in 'atsi' 626 * @param atsi_count number of records in 'atsi'
627 */ 627 */
628static void 628static void
629handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 629handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
630 const struct GNUNET_ATS_Information *atsi,
631 unsigned int atsi_count)
632{ 630{
633 struct PeerInfo *ret; 631 struct PeerInfo *ret;
634 int peer_bucket; 632 int peer_bucket;
@@ -1548,9 +1546,7 @@ core_init (void *cls, struct GNUNET_CORE_Handle *server,
1548 */ 1546 */
1549static int 1547static int
1550handle_dht_p2p_put (void *cls, const struct GNUNET_PeerIdentity *peer, 1548handle_dht_p2p_put (void *cls, const struct GNUNET_PeerIdentity *peer,
1551 const struct GNUNET_MessageHeader *message, 1549 const struct GNUNET_MessageHeader *message)
1552 const struct GNUNET_ATS_Information *atsi,
1553 unsigned int atsi_count)
1554{ 1550{
1555 const struct PeerPutMessage *put; 1551 const struct PeerPutMessage *put;
1556 const struct GNUNET_PeerIdentity *put_path; 1552 const struct GNUNET_PeerIdentity *put_path;
@@ -1801,9 +1797,7 @@ handle_find_peer (const struct GNUNET_PeerIdentity *sender,
1801 */ 1797 */
1802static int 1798static int
1803handle_dht_p2p_get (void *cls, const struct GNUNET_PeerIdentity *peer, 1799handle_dht_p2p_get (void *cls, const struct GNUNET_PeerIdentity *peer,
1804 const struct GNUNET_MessageHeader *message, 1800 const struct GNUNET_MessageHeader *message)
1805 const struct GNUNET_ATS_Information *atsi,
1806 unsigned int atsi_count)
1807{ 1801{
1808 struct PeerGetMessage *get; 1802 struct PeerGetMessage *get;
1809 uint32_t xquery_size; 1803 uint32_t xquery_size;
@@ -1943,9 +1937,7 @@ handle_dht_p2p_get (void *cls, const struct GNUNET_PeerIdentity *peer,
1943 */ 1937 */
1944static int 1938static int
1945handle_dht_p2p_result (void *cls, const struct GNUNET_PeerIdentity *peer, 1939handle_dht_p2p_result (void *cls, const struct GNUNET_PeerIdentity *peer,
1946 const struct GNUNET_MessageHeader *message, 1940 const struct GNUNET_MessageHeader *message)
1947 const struct GNUNET_ATS_Information *atsi,
1948 unsigned int atsi_count)
1949{ 1941{
1950 const struct PeerResultMessage *prm; 1942 const struct PeerResultMessage *prm;
1951 const struct GNUNET_PeerIdentity *put_path; 1943 const struct GNUNET_PeerIdentity *put_path;
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index 4364265a8..a4e18480e 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -267,9 +267,7 @@ update_latencies (const struct GNUNET_ATS_Information *atsi,
267 */ 267 */
268static int 268static int
269handle_p2p_put (void *cls, const struct GNUNET_PeerIdentity *other, 269handle_p2p_put (void *cls, const struct GNUNET_PeerIdentity *other,
270 const struct GNUNET_MessageHeader *message, 270 const struct GNUNET_MessageHeader *message)
271 const struct GNUNET_ATS_Information *atsi,
272 unsigned int atsi_count)
273{ 271{
274 struct GSF_ConnectedPeer *cp; 272 struct GSF_ConnectedPeer *cp;
275 273
@@ -280,7 +278,8 @@ handle_p2p_put (void *cls, const struct GNUNET_PeerIdentity *other,
280 return GNUNET_OK; 278 return GNUNET_OK;
281 } 279 }
282 GSF_cover_content_count++; 280 GSF_cover_content_count++;
283 update_latencies (atsi, atsi_count); 281 fprintf (stderr, "FIX ATS DATA!\n");
282 update_latencies (NULL, 0);
284 return GSF_handle_p2p_content_ (cp, message); 283 return GSF_handle_p2p_content_ (cp, message);
285} 284}
286 285
@@ -349,9 +348,7 @@ consider_forwarding (void *cls, struct GSF_PendingRequest *pr,
349 */ 348 */
350static int 349static int
351handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other, 350handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other,
352 const struct GNUNET_MessageHeader *message, 351 const struct GNUNET_MessageHeader *message)
353 const struct GNUNET_ATS_Information *atsi,
354 unsigned int atsi_count)
355{ 352{
356 struct GSF_PendingRequest *pr; 353 struct GSF_PendingRequest *pr;
357 354
@@ -360,7 +357,8 @@ handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other,
360 return GNUNET_SYSERR; 357 return GNUNET_SYSERR;
361 GSF_pending_request_get_data_ (pr)->has_started = GNUNET_YES; 358 GSF_pending_request_get_data_ (pr)->has_started = GNUNET_YES;
362 GSF_local_lookup_ (pr, &consider_forwarding, NULL); 359 GSF_local_lookup_ (pr, &consider_forwarding, NULL);
363 update_latencies (atsi, atsi_count); 360 fprintf (stderr, "FIX ATS DATA!\n");
361 update_latencies (NULL, 0);
364 return GNUNET_OK; 362 return GNUNET_OK;
365} 363}
366 364
@@ -536,15 +534,14 @@ consider_peer_for_forwarding (void *cls, const struct GNUNET_HashCode * key,
536 * @param atsi_count number of records in 'atsi' 534 * @param atsi_count number of records in 'atsi'
537 */ 535 */
538static void 536static void
539peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, 537peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer)
540 const struct GNUNET_ATS_Information *atsi,
541 unsigned int atsi_count)
542{ 538{
543 struct GSF_ConnectedPeer *cp; 539 struct GSF_ConnectedPeer *cp;
544 540
545 if (0 == memcmp (&my_id, peer, sizeof (struct GNUNET_PeerIdentity))) 541 if (0 == memcmp (&my_id, peer, sizeof (struct GNUNET_PeerIdentity)))
546 return; 542 return;
547 cp = GSF_peer_connect_handler_ (peer, atsi, atsi_count); 543 fprintf (stderr, "FIX ATS DATA!\n");
544 cp = GSF_peer_connect_handler_ (peer, NULL, 0);
548 if (NULL == cp) 545 if (NULL == cp)
549 return; 546 return;
550 GSF_iterate_pending_requests_ (&consider_peer_for_forwarding, cp); 547 GSF_iterate_pending_requests_ (&consider_peer_for_forwarding, cp);
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c
index f38a32c81..6e1f8728a 100644
--- a/src/fs/gnunet-service-fs_cp.c
+++ b/src/fs/gnunet-service-fs_cp.c
@@ -692,9 +692,7 @@ GSF_peer_get_ (const struct GNUNET_PeerIdentity *peer)
692int 692int
693GSF_handle_p2p_migration_stop_ (void *cls, 693GSF_handle_p2p_migration_stop_ (void *cls,
694 const struct GNUNET_PeerIdentity *other, 694 const struct GNUNET_PeerIdentity *other,
695 const struct GNUNET_MessageHeader *message, 695 const struct GNUNET_MessageHeader *message)
696 const struct GNUNET_ATS_Information *atsi,
697 unsigned int atsi_count)
698{ 696{
699 struct GSF_ConnectedPeer *cp; 697 struct GSF_ConnectedPeer *cp;
700 const struct MigrationStopMessage *msm; 698 const struct MigrationStopMessage *msm;
@@ -722,7 +720,8 @@ GSF_handle_p2p_migration_stop_ (void *cls,
722 cp->mig_revive_task = 720 cp->mig_revive_task =
723 GNUNET_SCHEDULER_add_delayed (bt, &revive_migration, cp); 721 GNUNET_SCHEDULER_add_delayed (bt, &revive_migration, cp);
724 } 722 }
725 update_atsi (cp, atsi, atsi_count); 723 fprintf (stderr, "FIX ATS DATA!\n");
724 update_atsi (cp, NULL, 0);
726 return GNUNET_OK; 725 return GNUNET_OK;
727} 726}
728 727
diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h
index 3bb05ace6..fae07b4cf 100644
--- a/src/fs/gnunet-service-fs_cp.h
+++ b/src/fs/gnunet-service-fs_cp.h
@@ -302,9 +302,7 @@ GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp,
302int 302int
303GSF_handle_p2p_migration_stop_ (void *cls, 303GSF_handle_p2p_migration_stop_ (void *cls,
304 const struct GNUNET_PeerIdentity *other, 304 const struct GNUNET_PeerIdentity *other,
305 const struct GNUNET_MessageHeader *message, 305 const struct GNUNET_MessageHeader *message);
306 const struct GNUNET_ATS_Information *atsi,
307 unsigned int atsi_count);
308 306
309 307
310/** 308/**
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h
index 6f8da2487..90b971933 100644
--- a/src/include/gnunet_core_service.h
+++ b/src/include/gnunet_core_service.h
@@ -56,15 +56,10 @@ struct GNUNET_CORE_Handle;
56 * 56 *
57 * @param cls closure 57 * @param cls closure
58 * @param peer peer identity this notification is about 58 * @param peer peer identity this notification is about
59 * @param atsi performance data for the connection
60 * @param atsi_count number of records in 'atsi'
61 */ 59 */
62typedef void (*GNUNET_CORE_ConnectEventHandler) (void *cls, 60typedef void (*GNUNET_CORE_ConnectEventHandler) (void *cls,
63 const struct 61 const struct
64 GNUNET_PeerIdentity * peer, 62 GNUNET_PeerIdentity * peer);
65 const struct
66 GNUNET_ATS_Information * atsi,
67 unsigned int atsi_count);
68 63
69 64
70/** 65/**
@@ -86,8 +81,6 @@ typedef void (*GNUNET_CORE_DisconnectEventHandler) (void *cls,
86 * @param peer the other peer involved (sender or receiver, NULL 81 * @param peer the other peer involved (sender or receiver, NULL
87 * for loopback messages where we are both sender and receiver) 82 * for loopback messages where we are both sender and receiver)
88 * @param message the actual message 83 * @param message the actual message
89 * @param atsi performance data for the connection
90 * @param atsi_count number of records in 'atsi'
91 * @return GNUNET_OK to keep the connection open, 84 * @return GNUNET_OK to keep the connection open,
92 * GNUNET_SYSERR to close it (signal serious error) 85 * GNUNET_SYSERR to close it (signal serious error)
93 */ 86 */
@@ -95,9 +88,7 @@ typedef int (*GNUNET_CORE_MessageCallback) (void *cls,
95 const struct GNUNET_PeerIdentity * 88 const struct GNUNET_PeerIdentity *
96 other, 89 other,
97 const struct GNUNET_MessageHeader * 90 const struct GNUNET_MessageHeader *
98 message, 91 message);
99 const struct GNUNET_ATS_Information
100 * atsi, unsigned int atsi_count);
101 92
102 93
103/** 94/**