diff options
author | Julius Bünger <buenger@mytum.de> | 2015-01-02 15:54:41 +0000 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2015-01-02 15:54:41 +0000 |
commit | 168354abecc858a90c4db8363db78593b0c24a7b (patch) | |
tree | b878fa7948b787ed645d639abcf2673cc57bfe11 /src | |
parent | dea3f8afc5931e17a4cb9053883aaad374cd0412 (diff) | |
download | gnunet-168354abecc858a90c4db8363db78593b0c24a7b.tar.gz gnunet-168354abecc858a90c4db8363db78593b0c24a7b.zip |
removed unneeded api call
Diffstat (limited to 'src')
-rw-r--r-- | src/include/gnunet_rps_service.h | 18 | ||||
-rw-r--r-- | src/rps/rps_api.c | 51 |
2 files changed, 0 insertions, 69 deletions
diff --git a/src/include/gnunet_rps_service.h b/src/include/gnunet_rps_service.h index b6d1cb71f..259fd1eca 100644 --- a/src/include/gnunet_rps_service.h +++ b/src/include/gnunet_rps_service.h | |||
@@ -59,24 +59,6 @@ struct GNUNET_RPS_Request_Handle; | |||
59 | typedef void (* GNUNET_RPS_NotifyReadyCB) (void *cls, uint64_t num_peers, const struct GNUNET_PeerIdentity *peers); | 59 | typedef void (* GNUNET_RPS_NotifyReadyCB) (void *cls, uint64_t num_peers, const struct GNUNET_PeerIdentity *peers); |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * Request n random peers. | ||
63 | * | ||
64 | * This is a wrapper function that makes it unnecessary to have to | ||
65 | * (dis)connect from/to the service. | ||
66 | * | ||
67 | * @param cfg the configuration to use | ||
68 | * @param n number of peers to be returned | ||
69 | * @param ready_cb the callback to be called when the PeerIDs are available | ||
70 | * @param cls closure given to the callback | ||
71 | * @return handle to this request | ||
72 | */ | ||
73 | struct GNUNET_RPS_Request_Handle * | ||
74 | GNUNET_RPS_request_peers_single_call (const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
75 | uint64_t n, | ||
76 | GNUNET_RPS_NotifyReadyCB ready_cb, | ||
77 | void *cls); | ||
78 | |||
79 | /** | ||
80 | * Connect to the rps service | 62 | * Connect to the rps service |
81 | * | 63 | * |
82 | * @param cfg configuration to use | 64 | * @param cfg configuration to use |
diff --git a/src/rps/rps_api.c b/src/rps/rps_api.c index 460d8fca4..ee00db911 100644 --- a/src/rps/rps_api.c +++ b/src/rps/rps_api.c | |||
@@ -149,57 +149,6 @@ mq_error_handler(void *cls, enum GNUNET_MQ_Error error) | |||
149 | } | 149 | } |
150 | 150 | ||
151 | /** | 151 | /** |
152 | * Request n random peers. | ||
153 | * | ||
154 | * @param cfg the configuration to use. | ||
155 | * @param n number of peers requesting. | ||
156 | * @param cb a callback function called when the peers are ready | ||
157 | * @param cls a closure given to the callback function | ||
158 | */ | ||
159 | struct GNUNET_RPS_Request_Handle * | ||
160 | GNUNET_RPS_request_peers_single_call (const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
161 | uint64_t n, | ||
162 | GNUNET_RPS_NotifyReadyCB ready_cb, | ||
163 | void *cls) | ||
164 | { | ||
165 | //struct GNUNET_CLIENT_Connection *service_conn; | ||
166 | //static const struct GNUNET_MQ_MessageHandler mq_handlers[] = { | ||
167 | // {&handle_reply, GNUNET_MESSAGE_TYPE_RPS_CS_REPLY, 0}, | ||
168 | // GNUNET_MQ_HANDLERS_END | ||
169 | //}; | ||
170 | //struct cb_cls_pack *pack; | ||
171 | //struct GNUNET_MQ_Handle *mq; | ||
172 | //struct GNUNET_MQ_Envelope *ev; | ||
173 | //struct GNUNET_RPS_CS_RequestMessage *msg; | ||
174 | struct GNUNET_RPS_Handle *h; | ||
175 | struct GNUNET_RPS_Request_Handle *rh; | ||
176 | |||
177 | /* Connect to the service */ | ||
178 | h = GNUNET_RPS_connect(cfg); | ||
179 | //h = GNUNET_new(struct GNUNET_RPS_Handle); | ||
180 | //h->conn = GNUNET_CLIENT_connect("rps", cfg); | ||
181 | //rh = GNUNET_new(struct GNUNET_RPS_Request_Handle); | ||
182 | ////pack = GNUNET_malloc(sizeof(struct cb_cls_pack)); | ||
183 | ////pack->cb = ready_cb; | ||
184 | ////pack->cls = cls; | ||
185 | ////pack->service_conn = service_conn; | ||
186 | //mq = GNUNET_MQ_queue_for_connection_client(service_conn, | ||
187 | // mq_handlers, | ||
188 | // mq_error_handler, // TODO implement | ||
189 | // h); | ||
190 | |||
191 | /* Send the request to the service */ | ||
192 | rh = GNUNET_RPS_request_peers(h, n, ready_cb, cls); | ||
193 | //ev = GNUNET_MQ_msg(msg, GNUNET_MESSAGE_TYPE_RPS_CS_REQUEST); | ||
194 | //msg->num_peers = GNUNET_htonll(n); | ||
195 | //GNUNET_MQ_send(mq, ev); | ||
196 | //GNUNET_CLIENT_disconnect(service_conn); | ||
197 | //rh = GNUNET_new(struct GNUNET_RPS_Request_Handle); | ||
198 | GNUNET_RPS_disconnect(h); | ||
199 | return rh; | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * Connect to the rps service | 152 | * Connect to the rps service |
204 | * | 153 | * |
205 | * @param cfg configuration to use | 154 | * @param cfg configuration to use |