aboutsummaryrefslogtreecommitdiff
path: root/src/ats
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-07-26 06:50:53 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-07-26 06:50:53 +0000
commit29b86b08086ad1cbf834c9b2ad9a5164b01e94c3 (patch)
treeb13b2f6b859c7802d81c8bee34beb455f84ed509 /src/ats
parent851989a46fc5cf5f792ac3f53fa45b29c783a15a (diff)
downloadgnunet-29b86b08086ad1cbf834c9b2ad9a5164b01e94c3.tar.gz
gnunet-29b86b08086ad1cbf834c9b2ad9a5164b01e94c3.zip
transport fix
Diffstat (limited to 'src/ats')
-rw-r--r--src/ats/ats_api_scheduling.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c
index 0ba0e1ced..42539fc9f 100644
--- a/src/ats/ats_api_scheduling.c
+++ b/src/ats/ats_api_scheduling.c
@@ -1065,7 +1065,7 @@ GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SchedulingHandle *sh,
1065 * 1065 *
1066 * @param sh handle 1066 * @param sh handle
1067 * @param address the address 1067 * @param address the address
1068 * @param session session handle (if available) 1068 * @param session session handle, can be NULL
1069 * @param ats performance data for the address 1069 * @param ats performance data for the address
1070 * @param ats_count number of performance records in 'ats' 1070 * @param ats_count number of performance records in 'ats'
1071 * @return GNUNET_OK on success, GNUNET_SYSERR on error 1071 * @return GNUNET_OK on success, GNUNET_SYSERR on error
@@ -1091,11 +1091,6 @@ GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh,
1091 GNUNET_break (0); 1091 GNUNET_break (0);
1092 return GNUNET_SYSERR; 1092 return GNUNET_SYSERR;
1093 } 1093 }
1094 if (session == NULL)
1095 {
1096 GNUNET_break (0);
1097 return GNUNET_SYSERR;
1098 }
1099 1094
1100 namelen = 1095 namelen =
1101 (address->transport_name == 1096 (address->transport_name ==
@@ -1169,7 +1164,7 @@ GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh,
1169 * 1164 *
1170 * @param sh handle 1165 * @param sh handle
1171 * @param address the address 1166 * @param address the address
1172 * @param session session handle (if available) 1167 * @param session session handle, can be NULL
1173 * @param ats performance data for the address 1168 * @param ats performance data for the address
1174 * @param ats_count number of performance records in 'ats' 1169 * @param ats_count number of performance records in 'ats'
1175 */ 1170 */
@@ -1193,11 +1188,6 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh,
1193 GNUNET_break (0); 1188 GNUNET_break (0);
1194 return; 1189 return;
1195 } 1190 }
1196 if (session == NULL)
1197 {
1198 GNUNET_break (0);
1199 return;
1200 }
1201 1191
1202 namelen = 1192 namelen =
1203 (address->transport_name == 1193 (address->transport_name ==
@@ -1264,7 +1254,7 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh,
1264 * 1254 *
1265 * @param sh handle 1255 * @param sh handle
1266 * @param address the address 1256 * @param address the address
1267 * @param session session handle 1257 * @param session session handle, can be NULL
1268 * @param in_use GNUNET_YES if this address is now used, GNUNET_NO 1258 * @param in_use GNUNET_YES if this address is now used, GNUNET_NO
1269 * if address is not used any more 1259 * if address is not used any more
1270 */ 1260 */
@@ -1344,7 +1334,7 @@ GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh,
1344 * 1334 *
1345 * @param sh handle 1335 * @param sh handle
1346 * @param address the address 1336 * @param address the address
1347 * @param session session handle that is no longer valid 1337 * @param session session handle that is no longer valid, can be NULL
1348 */ 1338 */
1349void 1339void
1350GNUNET_ATS_address_destroyed (struct GNUNET_ATS_SchedulingHandle *sh, 1340GNUNET_ATS_address_destroyed (struct GNUNET_ATS_SchedulingHandle *sh,
@@ -1358,6 +1348,12 @@ GNUNET_ATS_address_destroyed (struct GNUNET_ATS_SchedulingHandle *sh,
1358 size_t msize; 1348 size_t msize;
1359 uint32_t s = 0; 1349 uint32_t s = 0;
1360 1350
1351 if (address == NULL)
1352 {
1353 GNUNET_break (0);
1354 return;
1355 }
1356
1361 GNUNET_assert (address->transport_name != NULL); 1357 GNUNET_assert (address->transport_name != NULL);
1362 namelen = strlen (address->transport_name) + 1; 1358 namelen = strlen (address->transport_name) + 1;
1363 GNUNET_assert (namelen > 1); 1359 GNUNET_assert (namelen > 1);