aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-11-14 13:47:59 +0000
committerChristian Grothoff <christian@grothoff.org>2010-11-14 13:47:59 +0000
commit30717630b9f5e7e4cb2460be731ae14d4b2e6d46 (patch)
treebd1e60ded1b45cb169b23a7c39dcb255d2e823f3 /src
parent65cc198f1c0343322d3d9721d62ee10b5ea6fdb7 (diff)
downloadgnunet-30717630b9f5e7e4cb2460be731ae14d4b2e6d46.tar.gz
gnunet-30717630b9f5e7e4cb2460be731ae14d4b2e6d46.zip
fixing uninit fields
Diffstat (limited to 'src')
-rw-r--r--src/core/gnunet-service-core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index 034f80060..2c6cdc55a 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -987,6 +987,9 @@ handle_peer_status_change (struct Neighbour *n)
987#endif 987#endif
988 psnm.header.size = htons (sizeof (struct PeerStatusNotifyMessage)); 988 psnm.header.size = htons (sizeof (struct PeerStatusNotifyMessage));
989 psnm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_STATUS_CHANGE); 989 psnm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_STATUS_CHANGE);
990 psnm.ats_count = htonl (0);
991 psnm.ats.type = htonl (0);
992 psnm.ats.value = htonl (0);
990 psnm.timeout = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_add (n->last_activity, 993 psnm.timeout = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_add (n->last_activity,
991 GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT)); 994 GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT));
992 psnm.bandwidth_in = n->bw_in; 995 psnm.bandwidth_in = n->bw_in;
@@ -1204,6 +1207,9 @@ handle_client_init (void *cls,
1204 /* notify new client about existing neighbours */ 1207 /* notify new client about existing neighbours */
1205 cnm.header.size = htons (sizeof (struct ConnectNotifyMessage)); 1208 cnm.header.size = htons (sizeof (struct ConnectNotifyMessage));
1206 cnm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT); 1209 cnm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT);
1210 cnm.ats_count = htonl (0);
1211 cnm.ats.type = htonl (0);
1212 cnm.ats.value = htonl (0);
1207 n = neighbours; 1213 n = neighbours;
1208 while (n != NULL) 1214 while (n != NULL)
1209 { 1215 {
@@ -2088,6 +2094,9 @@ batch_message (struct Neighbour *n,
2088 return 0; 2094 return 0;
2089 } 2095 }
2090 ntm->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND); 2096 ntm->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND);
2097 ntm->ats_count = htonl (0);
2098 ntm->ats.type = htonl (0);
2099 ntm->ats.value = htonl (0);
2091 ntm->peer = n->peer; 2100 ntm->peer = n->peer;
2092 pos = n->messages; 2101 pos = n->messages;
2093 prev = NULL; 2102 prev = NULL;
@@ -3518,6 +3527,9 @@ send_p2p_message_to_client (struct Neighbour *sender,
3518 ntm = (struct NotifyTrafficMessage *) buf; 3527 ntm = (struct NotifyTrafficMessage *) buf;
3519 ntm->header.size = htons (msize + sizeof (struct NotifyTrafficMessage)); 3528 ntm->header.size = htons (msize + sizeof (struct NotifyTrafficMessage));
3520 ntm->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND); 3529 ntm->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND);
3530 ntm->ats_count = htonl (0);
3531 ntm->ats.type = htonl (0);
3532 ntm->ats.value = htonl (0);
3521 ntm->peer = sender->peer; 3533 ntm->peer = sender->peer;
3522 memcpy (&ntm[1], m, msize); 3534 memcpy (&ntm[1], m, msize);
3523 send_to_client (client, &ntm->header, GNUNET_YES); 3535 send_to_client (client, &ntm->header, GNUNET_YES);