aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2015-01-18 23:52:57 +0000
committerJulius Bünger <buenger@mytum.de>2015-01-18 23:52:57 +0000
commite808b962040d4b253deffae4cabf80340aaeea35 (patch)
tree6f3185e0a6d0a6a93a972c6b1925c3233a4c69a3
parent81b7ddce7d96f7538af501fa1da032cceb89d84a (diff)
downloadgnunet-e808b962040d4b253deffae4cabf80340aaeea35.tar.gz
gnunet-e808b962040d4b253deffae4cabf80340aaeea35.zip
undo last commit
-rw-r--r--src/rps/gnunet-service-rps.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index b3932ba22..f48e727b8 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -117,9 +117,9 @@ enum PeerFlags
117 IN_OWN_GOSSIP_LIST = 0x08, // unneeded? 117 IN_OWN_GOSSIP_LIST = 0x08, // unneeded?
118 118
119 /** 119 /**
120 * We set this bit when we receive a hello in response to opening a channel. 120 * We set this bit when we can be sure the other peer is/was live.
121 */ 121 */
122 IS_LIVE = 0x10 122 LIVING = 0x10
123}; 123};
124 124
125/** 125/**
@@ -803,31 +803,6 @@ handle_peer_pull_reply (void *cls,
803 803
804 804
805/** 805/**
806 * Handle Hello message from other peer.
807 */
808 static int
809handle_peer_hello (void *cls,
810 struct GNUNET_CADET_Channel *channel,
811 void **channel_ctx,
812 const struct GNUNET_MessageHeader *msg)
813{
814 const struct GNUNET_PeerIdentity *peer;
815 struct PeerContext *peer_ctx;
816
817 peer = (struct GNUNET_PeerIdentity *) GNUNET_CADET_channel_get_info (channel,
818 GNUNET_CADET_OPTION_PEER);
819 // FIXME wait for cadet to change this function
820
821 LOG (GNUNET_ERROR_TYPE_DEBUG, "HELLO received from %s\n", GNUNET_i2s (peer));
822
823 peer_ctx = get_peer_ctx (peer_map, peer);
824 peer_ctx->peer_flags |= IS_LIVE;
825
826 return GNUNET_OK;
827}
828
829
830/**
831 * Send out PUSHes and PULLs. 806 * Send out PUSHes and PULLs.
832 * 807 *
833 * This is executed regylary. 808 * This is executed regylary.
@@ -1181,11 +1156,6 @@ handle_inbound_channel (void *cls,
1181 1156
1182 GNUNET_assert (NULL != channel); 1157 GNUNET_assert (NULL != channel);
1183 1158
1184 /* Send hello message to other peer */
1185 ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_RPS_PP_HELLO);
1186 mq = get_mq (peer_map, initiator);
1187 GNUNET_MQ_send (mq, ev);
1188
1189 // we might not even store the recv_channel 1159 // we might not even store the recv_channel
1190 1160
1191 ctx = get_peer_ctx (peer_map, initiator); 1161 ctx = get_peer_ctx (peer_map, initiator);
@@ -1359,8 +1329,6 @@ run (void *cls,
1359 {&handle_peer_pull_request, GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST, 1329 {&handle_peer_pull_request, GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST,
1360 sizeof (struct GNUNET_MessageHeader)}, 1330 sizeof (struct GNUNET_MessageHeader)},
1361 {&handle_peer_pull_reply , GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REPLY , 0}, 1331 {&handle_peer_pull_reply , GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REPLY , 0},
1362 {&handle_peer_hello , GNUNET_MESSAGE_TYPE_RPS_PP_HELLO ,
1363 sizeof (struct GNUNET_MessageHeader)},
1364 {NULL, 0, 0} 1332 {NULL, 0, 0}
1365 }; 1333 };
1366 1334