aboutsummaryrefslogtreecommitdiff
path: root/src/ats/ats_api_performance.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-03-26 15:02:37 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-03-26 15:02:37 +0000
commitfec18deaff1382f2fc7598cb4a5c87865447ddda (patch)
tree7f3319f352f1b53efde2c4f66eb09297237f9339 /src/ats/ats_api_performance.c
parent916a78761f48b4fabf4fd7d3d93f12cb679f4bd6 (diff)
downloadgnunet-fec18deaff1382f2fc7598cb4a5c87865447ddda.tar.gz
gnunet-fec18deaff1382f2fc7598cb4a5c87865447ddda.zip
api change
Diffstat (limited to 'src/ats/ats_api_performance.c')
-rw-r--r--src/ats/ats_api_performance.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c
index 16495b604..8acce225f 100644
--- a/src/ats/ats_api_performance.c
+++ b/src/ats/ats_api_performance.c
@@ -181,16 +181,6 @@ struct GNUNET_ATS_PerformanceHandle
181 void *addr_info_cb_cls; 181 void *addr_info_cb_cls;
182 182
183 /** 183 /**
184 * Callback to invoke when a peer has performance changes.
185 */
186 GNUNET_ATS_PerformanceMonitorCb perf_monitor_cb;
187
188 /**
189 * Closure for 'perf_monitor_cb'.
190 */
191 void *perf_monitor_cb_cls;
192
193 /**
194 * Connection to ATS service. 184 * Connection to ATS service.
195 */ 185 */
196 struct GNUNET_CLIENT_Connection *client; 186 struct GNUNET_CLIENT_Connection *client;
@@ -396,15 +386,6 @@ process_pi_message (struct GNUNET_ATS_PerformanceHandle *ph,
396 ph->addr_info_cb (ph->addr_info_cb_cls, &address, addr_active, pi->bandwidth_out, pi->bandwidth_in, 386 ph->addr_info_cb (ph->addr_info_cb_cls, &address, addr_active, pi->bandwidth_out, pi->bandwidth_in,
397 atsi, ats_count); 387 atsi, ats_count);
398 } 388 }
399 if ((NULL != ph->perf_monitor_cb) &&
400 (GNUNET_YES == addr_active))
401 {
402 ph->perf_monitor_cb (ph->perf_monitor_cb_cls,
403 &pi->peer,
404 pi->bandwidth_out,
405 pi->bandwidth_in,
406 atsi, ats_count);
407 }
408 return GNUNET_OK; 389 return GNUNET_OK;
409} 390}
410 391
@@ -640,7 +621,7 @@ reconnect (struct GNUNET_ATS_PerformanceHandle *ph)
640 init->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_START); 621 init->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_START);
641 init->header.size = htons (sizeof (struct ClientStartMessage)); 622 init->header.size = htons (sizeof (struct ClientStartMessage));
642 init->start_flag = 623 init->start_flag =
643 htonl (((NULL ==ph->addr_info_cb) && (NULL == ph->perf_monitor_cb)) ? 624 htonl ((NULL ==ph->addr_info_cb) ?
644 START_FLAG_PERFORMANCE_NO_PIC : START_FLAG_PERFORMANCE_WITH_PIC); 625 START_FLAG_PERFORMANCE_NO_PIC : START_FLAG_PERFORMANCE_WITH_PIC);
645 GNUNET_CONTAINER_DLL_insert (ph->pending_head, ph->pending_tail, p); 626 GNUNET_CONTAINER_DLL_insert (ph->pending_head, ph->pending_tail, p);
646 } 627 }
@@ -653,9 +634,6 @@ reconnect (struct GNUNET_ATS_PerformanceHandle *ph)
653 * Get handle to access performance API of the ATS subsystem. 634 * Get handle to access performance API of the ATS subsystem.
654 * 635 *
655 * @param cfg configuration to use 636 * @param cfg configuration to use
656 * @param perf_monitor_cb callback called when performance characteristics for
657 * a peer change
658 * @param perf_monitor_cb closure for the perf_monitor_cb
659 * @param addr_info_cb callback called when performance characteristics for 637 * @param addr_info_cb callback called when performance characteristics for
660 * an address change 638 * an address change
661 * @param addr_info_cb_cls closure for infocb 639 * @param addr_info_cb_cls closure for infocb
@@ -663,8 +641,6 @@ reconnect (struct GNUNET_ATS_PerformanceHandle *ph)
663 */ 641 */
664struct GNUNET_ATS_PerformanceHandle * 642struct GNUNET_ATS_PerformanceHandle *
665GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg, 643GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
666 GNUNET_ATS_PerformanceMonitorCb perf_monitor_cb,
667 void *perf_monitor_cb_cls,
668 GNUNET_ATS_AddressInformationCallback addr_info_cb, 644 GNUNET_ATS_AddressInformationCallback addr_info_cb,
669 void *addr_info_cb_cls) 645 void *addr_info_cb_cls)
670{ 646{
@@ -674,8 +650,6 @@ GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
674 ph->cfg = cfg; 650 ph->cfg = cfg;
675 ph->addr_info_cb = addr_info_cb; 651 ph->addr_info_cb = addr_info_cb;
676 ph->addr_info_cb_cls = addr_info_cb_cls; 652 ph->addr_info_cb_cls = addr_info_cb_cls;
677 ph->perf_monitor_cb = perf_monitor_cb;
678 ph->perf_monitor_cb_cls = perf_monitor_cb_cls;
679 ph->id = 0; 653 ph->id = 0;
680 reconnect (ph); 654 reconnect (ph);
681 return ph; 655 return ph;