aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-05-27 17:41:52 +0000
committerChristian Grothoff <christian@grothoff.org>2012-05-27 17:41:52 +0000
commit6a3aa5797d49178e806fc5cc5713806647cbd040 (patch)
tree1036536717420988f348741fb3af5eda76cd74a7
parent9d398608d565f1c15faeb9755a8a3f06e7ccfbfb (diff)
downloadgnunet-6a3aa5797d49178e806fc5cc5713806647cbd040.tar.gz
gnunet-6a3aa5797d49178e806fc5cc5713806647cbd040.zip
-fix #2378
-rw-r--r--src/ats/ats_api_scheduling.c14
-rw-r--r--src/fs/fs_search.c2
-rw-r--r--src/include/gnunet_ats_service.h1
-rw-r--r--src/include/gnunet_transport_plugin.h11
4 files changed, 16 insertions, 12 deletions
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c
index 583ada8f7..5a4e8831f 100644
--- a/src/ats/ats_api_scheduling.c
+++ b/src/ats/ats_api_scheduling.c
@@ -145,7 +145,6 @@ struct GNUNET_ATS_SchedulingHandle
145 */ 145 */
146 struct ATS_Network * net_tail; 146 struct ATS_Network * net_tail;
147 147
148
149 /** 148 /**
150 * Array of session objects (we need to translate them to numbers and back 149 * Array of session objects (we need to translate them to numbers and back
151 * for the protocol; the offset in the array is the session number on the 150 * for the protocol; the offset in the array is the session number on the
@@ -162,7 +161,6 @@ struct GNUNET_ATS_SchedulingHandle
162 /** 161 /**
163 * Task retrieving interfaces from the system 162 * Task retrieving interfaces from the system
164 */ 163 */
165
166 GNUNET_SCHEDULER_TaskIdentifier interface_task; 164 GNUNET_SCHEDULER_TaskIdentifier interface_task;
167 165
168 166
@@ -619,10 +617,10 @@ reconnect (struct GNUNET_ATS_SchedulingHandle *sh)
619 do_transmit (sh); 617 do_transmit (sh);
620} 618}
621 619
620
622/** 621/**
623 * delete the current network list 622 * delete the current network list
624 */ 623 */
625
626static void 624static void
627delete_networks (struct GNUNET_ATS_SchedulingHandle *sh) 625delete_networks (struct GNUNET_ATS_SchedulingHandle *sh)
628{ 626{
@@ -735,7 +733,6 @@ interface_proc (void *cls, const char *name,
735} 733}
736 734
737 735
738
739/** 736/**
740 * Periodically get list of addresses 737 * Periodically get list of addresses
741 * @param cls closure 738 * @param cls closure
@@ -753,14 +750,15 @@ get_addresses (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
753 sh); 750 sh);
754} 751}
755 752
753
756/** 754/**
757 * Returns where the address is located: LAN or WAN or ... 755 * Returns where the address is located: LAN or WAN or ...
756 *
758 * @param sh the scheduling handle 757 * @param sh the scheduling handle
759 * @param addr address 758 * @param addr address
760 * @param addrlen address length 759 * @param addrlen address length
761 * @return location as GNUNET_ATS_Information 760 * @return location as GNUNET_ATS_Information
762 */ 761 */
763
764struct GNUNET_ATS_Information 762struct GNUNET_ATS_Information
765GNUNET_ATS_address_get_type (struct GNUNET_ATS_SchedulingHandle * sh, const struct sockaddr * addr, socklen_t addrlen) 763GNUNET_ATS_address_get_type (struct GNUNET_ATS_SchedulingHandle * sh, const struct sockaddr * addr, socklen_t addrlen)
766{ 764{
@@ -852,6 +850,7 @@ GNUNET_ATS_address_get_type (struct GNUNET_ATS_SchedulingHandle * sh, const stru
852 return (const struct GNUNET_ATS_Information) ats; 850 return (const struct GNUNET_ATS_Information) ats;
853} 851}
854 852
853
855/** 854/**
856 * Initialize the ATS subsystem. 855 * Initialize the ATS subsystem.
857 * 856 *
@@ -959,6 +958,8 @@ GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *sh,
959 struct PendingMessage *p; 958 struct PendingMessage *p;
960 struct RequestAddressMessage *m; 959 struct RequestAddressMessage *m;
961 960
961 // FIXME: ATS needs to remember this in case of
962 // a disconnect!
962 p = GNUNET_malloc (sizeof (struct PendingMessage) + 963 p = GNUNET_malloc (sizeof (struct PendingMessage) +
963 sizeof (struct RequestAddressMessage)); 964 sizeof (struct RequestAddressMessage));
964 p->size = sizeof (struct RequestAddressMessage); 965 p->size = sizeof (struct RequestAddressMessage);
@@ -999,6 +1000,7 @@ GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SchedulingHandle *sh,
999 do_transmit (sh); 1000 do_transmit (sh);
1000} 1001}
1001 1002
1003
1002/** 1004/**
1003 * We have updated performance statistics for a given address. Note 1005 * We have updated performance statistics for a given address. Note
1004 * that this function can be called for addresses that are currently 1006 * that this function can be called for addresses that are currently
@@ -1123,10 +1125,10 @@ GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh,
1123 memcpy (pm, address->address, address->address_length); 1125 memcpy (pm, address->address, address->address_length);
1124 memcpy (&pm[address->address_length], address->transport_name, namelen); 1126 memcpy (&pm[address->address_length], address->transport_name, namelen);
1125 GNUNET_CONTAINER_DLL_insert_tail (sh->pending_head, sh->pending_tail, p); 1127 GNUNET_CONTAINER_DLL_insert_tail (sh->pending_head, sh->pending_tail, p);
1126
1127 do_transmit (sh); 1128 do_transmit (sh);
1128} 1129}
1129 1130
1131
1130/** 1132/**
1131 * A session got destroyed, stop including it as a valid address. 1133 * A session got destroyed, stop including it as a valid address.
1132 * 1134 *
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index 3eacbe9cb..b280670f6 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -1583,7 +1583,7 @@ GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc)
1583 GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map, 1583 GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
1584 &search_result_free, sc); 1584 &search_result_free, sc);
1585 GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map); 1585 GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map);
1586 if (NULL == sc->requests) 1586 if (NULL != sc->requests)
1587 { 1587 {
1588 GNUNET_assert (GNUNET_FS_uri_test_ksk (sc->uri)); 1588 GNUNET_assert (GNUNET_FS_uri_test_ksk (sc->uri));
1589 for (i = 0; i < sc->uri->data.ksk.keywordCount; i++) 1589 for (i = 0; i < sc->uri->data.ksk.keywordCount; i++)
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h
index a5f1bdc23..aa7a08916 100644
--- a/src/include/gnunet_ats_service.h
+++ b/src/include/gnunet_ats_service.h
@@ -605,6 +605,7 @@ GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh,
605 const struct GNUNET_HELLO_Address *address, 605 const struct GNUNET_HELLO_Address *address,
606 struct Session *session, int in_use); 606 struct Session *session, int in_use);
607 607
608
608/** 609/**
609 * A session got destroyed, stop including it as a valid address. 610 * A session got destroyed, stop including it as a valid address.
610 * 611 *
diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h
index 1e46c92f8..6039809f7 100644
--- a/src/include/gnunet_transport_plugin.h
+++ b/src/include/gnunet_transport_plugin.h
@@ -313,11 +313,12 @@ typedef void (*GNUNET_TRANSPORT_TransmitContinuation) (void *cls,
313 * and does NOT mean that the message was not transmitted (DV) 313 * and does NOT mean that the message was not transmitted (DV)
314 */ 314 */
315typedef ssize_t (*GNUNET_TRANSPORT_TransmitFunction) (void *cls, 315typedef ssize_t (*GNUNET_TRANSPORT_TransmitFunction) (void *cls,
316 struct Session *session, 316 struct Session *session,
317 const char *msgbuf, size_t msgbuf_size, 317 const char *msgbuf, size_t msgbuf_size,
318 unsigned int priority, 318 unsigned int priority,
319 struct GNUNET_TIME_Relative to, 319 struct GNUNET_TIME_Relative to,
320 GNUNET_TRANSPORT_TransmitContinuation cont, void *cont_cls); 320 GNUNET_TRANSPORT_TransmitContinuation cont,
321 void *cont_cls);
321 322
322 323
323/** 324/**