diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-31 13:03:48 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-31 13:03:48 +0100 |
commit | 7e3cf5f461eb4fbb7581672bf0835da07c378136 (patch) | |
tree | bdc3874b7894242b095b892f1ed3e81a4d4f06c0 /src/transport | |
parent | 01b480d6d026e0c537dc284a7e7df2c0320a3528 (diff) | |
download | gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.tar.gz gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.zip |
tighten formatting rules
Diffstat (limited to 'src/transport')
52 files changed, 131 insertions, 101 deletions
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c index f3ccbd262..098bb9523 100644 --- a/src/transport/gnunet-communicator-tcp.c +++ b/src/transport/gnunet-communicator-tcp.c | |||
@@ -1052,8 +1052,7 @@ queue_read (void *cls) | |||
1052 | wrong key for everything after the rekey; in that case, we have | 1052 | wrong key for everything after the rekey; in that case, we have |
1053 | to re-do the decryption at 'total' instead of at 'max'. If there | 1053 | to re-do the decryption at 'total' instead of at 'max'. If there |
1054 | is no rekey and the last message is incomplete (max > total), | 1054 | is no rekey and the last message is incomplete (max > total), |
1055 | it is safe to keep the decryption so we shift by 'max' */ | 1055 | it is safe to keep the decryption so we shift by 'max' */if (GNUNET_YES == queue->rekeyed) |
1056 | if (GNUNET_YES == queue->rekeyed) | ||
1057 | { | 1056 | { |
1058 | max = total; | 1057 | max = total; |
1059 | queue->rekeyed = GNUNET_NO; | 1058 | queue->rekeyed = GNUNET_NO; |
diff --git a/src/transport/gnunet-communicator-udp.c b/src/transport/gnunet-communicator-udp.c index 2d9fabfec..80fc4142b 100644 --- a/src/transport/gnunet-communicator-udp.c +++ b/src/transport/gnunet-communicator-udp.c | |||
@@ -2526,8 +2526,7 @@ iface_proc (void *cls, | |||
2526 | * group in the normal IPv6 routing table and using the resulting | 2526 | * group in the normal IPv6 routing table and using the resulting |
2527 | * interface; we do this for each interface, so no need to use | 2527 | * interface; we do this for each interface, so no need to use |
2528 | * zero (anymore...). | 2528 | * zero (anymore...). |
2529 | */ | 2529 | */bi->mcreq.ipv6mr_interface = s6->sin6_scope_id; |
2530 | bi->mcreq.ipv6mr_interface = s6->sin6_scope_id; | ||
2531 | 2530 | ||
2532 | /* Join the multicast group */ | 2531 | /* Join the multicast group */ |
2533 | if (GNUNET_OK != GNUNET_NETWORK_socket_setsockopt (udp_sock, | 2532 | if (GNUNET_OK != GNUNET_NETWORK_socket_setsockopt (udp_sock, |
diff --git a/src/transport/gnunet-communicator-unix.c b/src/transport/gnunet-communicator-unix.c index d8205addb..2cfb802e3 100644 --- a/src/transport/gnunet-communicator-unix.c +++ b/src/transport/gnunet-communicator-unix.c | |||
@@ -1111,12 +1111,15 @@ main (int argc, char *const *argv) | |||
1111 | /** | 1111 | /** |
1112 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. | 1112 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. |
1113 | */ | 1113 | */ |
1114 | void __attribute__ ((constructor)) GNUNET_ARM_memory_init () | 1114 | void __attribute__ ((constructor)) |
1115 | GNUNET_ARM_memory_init () | ||
1115 | { | 1116 | { |
1116 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); | 1117 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); |
1117 | mallopt (M_TOP_PAD, 1 * 1024); | 1118 | mallopt (M_TOP_PAD, 1 * 1024); |
1118 | malloc_trim (0); | 1119 | malloc_trim (0); |
1119 | } | 1120 | } |
1121 | |||
1122 | |||
1120 | #endif | 1123 | #endif |
1121 | 1124 | ||
1122 | /* end of gnunet-communicator-unix.c */ | 1125 | /* end of gnunet-communicator-unix.c */ |
diff --git a/src/transport/gnunet-helper-transport-bluetooth.c b/src/transport/gnunet-helper-transport-bluetooth.c index c0e0d9673..9b56d0922 100644 --- a/src/transport/gnunet-helper-transport-bluetooth.c +++ b/src/transport/gnunet-helper-transport-bluetooth.c | |||
@@ -446,6 +446,7 @@ do_align: | |||
446 | return ret; | 446 | return ret; |
447 | } | 447 | } |
448 | 448 | ||
449 | |||
449 | /** | 450 | /** |
450 | * Destroys a tokenizer. | 451 | * Destroys a tokenizer. |
451 | * | 452 | * |
@@ -458,6 +459,7 @@ mst_destroy (struct MessageStreamTokenizer *mst) | |||
458 | free (mst); | 459 | free (mst); |
459 | } | 460 | } |
460 | 461 | ||
462 | |||
461 | /** | 463 | /** |
462 | * Calculate crc32, the start of the calculation | 464 | * Calculate crc32, the start of the calculation |
463 | * | 465 | * |
@@ -558,14 +560,13 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len) | |||
558 | 560 | ||
559 | crc = calc_crc_osdep (buf, len); | 561 | crc = calc_crc_osdep (buf, len); |
560 | buf += len; | 562 | buf += len; |
561 | if ((((crc) & 0xFF) == buf[0])&&(((crc >> 8) & 0xFF) == buf[1])&& | 563 | if ((((crc) & 0xFF) == buf[0]) && (((crc >> 8) & 0xFF) == buf[1]) && |
562 | ( ((crc >> 16) & 0xFF) == buf[2]) &&( ((crc >> 24) & 0xFF) == buf[3]) ) | 564 | ( ((crc >> 16) & 0xFF) == buf[2]) && ( ((crc >> 24) & 0xFF) == buf[3]) ) |
563 | return 0; | 565 | return 0; |
564 | return 1; | 566 | return 1; |
565 | } | 567 | } |
566 | 568 | ||
567 | 569 | ||
568 | |||
569 | /* ************** end of clone ***************** */ | 570 | /* ************** end of clone ***************** */ |
570 | #ifdef LINUX | 571 | #ifdef LINUX |
571 | /** | 572 | /** |
@@ -593,6 +594,8 @@ bind_socket (int socket, struct sockaddr_rc *addr) | |||
593 | 594 | ||
594 | return -1; | 595 | return -1; |
595 | } | 596 | } |
597 | |||
598 | |||
596 | #endif | 599 | #endif |
597 | 600 | ||
598 | /** | 601 | /** |
@@ -613,8 +616,7 @@ register_service (struct HardwareInfos *dev, int rc_channel) | |||
613 | * 5. set the name, provider and description | 616 | * 5. set the name, provider and description |
614 | * 6. register the service record to the local SDP server | 617 | * 6. register the service record to the local SDP server |
615 | * 7. cleanup | 618 | * 7. cleanup |
616 | */ | 619 | */uint8_t svc_uuid_int[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
617 | uint8_t svc_uuid_int[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
618 | dev->pl_mac.mac[5], dev->pl_mac.mac[4], | 620 | dev->pl_mac.mac[5], dev->pl_mac.mac[4], |
619 | dev->pl_mac.mac[3], | 621 | dev->pl_mac.mac[3], |
620 | dev->pl_mac.mac[2], dev->pl_mac.mac[1], | 622 | dev->pl_mac.mac[2], dev->pl_mac.mac[1], |
@@ -688,6 +690,7 @@ register_service (struct HardwareInfos *dev, int rc_channel) | |||
688 | return 0; | 690 | return 0; |
689 | } | 691 | } |
690 | 692 | ||
693 | |||
691 | /** | 694 | /** |
692 | * Function used for searching and browsing for a service. This will return the | 695 | * Function used for searching and browsing for a service. This will return the |
693 | * port number on which the service is running. | 696 | * port number on which the service is running. |
@@ -706,8 +709,7 @@ get_channel (struct HardwareInfos *dev, bdaddr_t dest) | |||
706 | * 2.2. get a list of service records with the specific UUID | 709 | * 2.2. get a list of service records with the specific UUID |
707 | * 2.3. for each service record get a list of the protocol sequences and get | 710 | * 2.3. for each service record get a list of the protocol sequences and get |
708 | * the port number | 711 | * the port number |
709 | */ | 712 | */uint8_t svc_uuid_int[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
710 | uint8_t svc_uuid_int[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
711 | dest.b[5], dest.b[4], dest.b[3], | 713 | dest.b[5], dest.b[4], dest.b[3], |
712 | dest.b[2], dest.b[1], dest.b[0] }; | 714 | dest.b[2], dest.b[1], dest.b[0] }; |
713 | sdp_session_t *session = 0; | 715 | sdp_session_t *session = 0; |
@@ -763,6 +765,7 @@ get_channel (struct HardwareInfos *dev, bdaddr_t dest) | |||
763 | return channel; | 765 | return channel; |
764 | } | 766 | } |
765 | 767 | ||
768 | |||
766 | /** | 769 | /** |
767 | * Read from the socket and put the result into the buffer for transmission to 'stdout'. | 770 | * Read from the socket and put the result into the buffer for transmission to 'stdout'. |
768 | * | 771 | * |
@@ -954,7 +957,6 @@ open_device (struct HardwareInfos *dev) | |||
954 | (void) close (fd_hci); | 957 | (void) close (fd_hci); |
955 | 958 | ||
956 | 959 | ||
957 | |||
958 | /* Bind the rfcomm socket to the interface */ | 960 | /* Bind the rfcomm socket to the interface */ |
959 | memset (&rc_addr, 0, sizeof(rc_addr)); | 961 | memset (&rc_addr, 0, sizeof(rc_addr)); |
960 | rc_addr.rc_family = AF_BLUETOOTH; | 962 | rc_addr.rc_family = AF_BLUETOOTH; |
@@ -1010,6 +1012,7 @@ mac_set (struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame *taIeeeHeader, | |||
1010 | taIeeeHeader->addr2 = dev->pl_mac; | 1012 | taIeeeHeader->addr2 = dev->pl_mac; |
1011 | } | 1013 | } |
1012 | 1014 | ||
1015 | |||
1013 | #ifdef LINUX | 1016 | #ifdef LINUX |
1014 | /** | 1017 | /** |
1015 | * Test if the given interface name really corresponds to a bluetooth | 1018 | * Test if the given interface name really corresponds to a bluetooth |
@@ -1038,6 +1041,8 @@ test_bluetooth_interface (const char *iface) | |||
1038 | } | 1041 | } |
1039 | return 0; | 1042 | return 0; |
1040 | } | 1043 | } |
1044 | |||
1045 | |||
1041 | #endif | 1046 | #endif |
1042 | 1047 | ||
1043 | /** | 1048 | /** |
@@ -1112,6 +1117,7 @@ stdin_send_hw (void *cls, const struct GNUNET_MessageHeader *hdr) | |||
1112 | write_pout.size = sendsize; | 1117 | write_pout.size = sendsize; |
1113 | } | 1118 | } |
1114 | 1119 | ||
1120 | |||
1115 | #ifdef LINUX | 1121 | #ifdef LINUX |
1116 | /** | 1122 | /** |
1117 | * Broadcast a HELLO message for peer discovery | 1123 | * Broadcast a HELLO message for peer discovery |
@@ -1127,7 +1133,7 @@ send_broadcast (struct HardwareInfos *dev, int *sendsocket) | |||
1127 | int loops = 0; | 1133 | int loops = 0; |
1128 | 1134 | ||
1129 | search_for_devices: | 1135 | search_for_devices: |
1130 | if (((neighbours.size == neighbours.pos)&&(new_device == 1)) || | 1136 | if (((neighbours.size == neighbours.pos) && (new_device == 1)) || |
1131 | (neighbours.size == 0) ) | 1137 | (neighbours.size == 0) ) |
1132 | { | 1138 | { |
1133 | inquiry_devices: // skip the conditions and force a inquiry for new devices | 1139 | inquiry_devices: // skip the conditions and force a inquiry for new devices |
@@ -1359,6 +1365,8 @@ inquiry_devices: // skip the conditions and force a inquiry for new devices | |||
1359 | 1365 | ||
1360 | return 0; | 1366 | return 0; |
1361 | } | 1367 | } |
1368 | |||
1369 | |||
1362 | #endif | 1370 | #endif |
1363 | 1371 | ||
1364 | /** | 1372 | /** |
@@ -1606,9 +1614,9 @@ main (int argc, char *argv[]) | |||
1606 | connect_retry: | 1614 | connect_retry: |
1607 | status = connect (sendsocket, (struct sockaddr *) &addr, | 1615 | status = connect (sendsocket, (struct sockaddr *) &addr, |
1608 | sizeof(addr)); | 1616 | sizeof(addr)); |
1609 | if ((0 != status) &&(errno != EAGAIN) ) | 1617 | if ((0 != status) && (errno != EAGAIN) ) |
1610 | { | 1618 | { |
1611 | if ((errno == ECONNREFUSED) &&(tries < 2) ) | 1619 | if ((errno == ECONNREFUSED) && (tries < 2) ) |
1612 | { | 1620 | { |
1613 | fprintf (stderr, "LOG : %.*s failed to connect. Trying again!\n", | 1621 | fprintf (stderr, "LOG : %.*s failed to connect. Trying again!\n", |
1614 | IFNAMSIZ, dev.iface); | 1622 | IFNAMSIZ, dev.iface); |
@@ -1668,7 +1676,7 @@ connect_retry: | |||
1668 | int retval = select (maxfd + 1, &rfds, &wfds, NULL, NULL); | 1676 | int retval = select (maxfd + 1, &rfds, &wfds, NULL, NULL); |
1669 | if ((-1 == retval) && (EINTR == errno)) | 1677 | if ((-1 == retval) && (EINTR == errno)) |
1670 | continue; | 1678 | continue; |
1671 | if ((0 > retval) &&(errno != EBADF) ) // we handle BADF errors later | 1679 | if ((0 > retval) && (errno != EBADF) ) // we handle BADF errors later |
1672 | { | 1680 | { |
1673 | fprintf (stderr, "select failed: %s\n", strerror (errno)); | 1681 | fprintf (stderr, "select failed: %s\n", strerror (errno)); |
1674 | break; | 1682 | break; |
diff --git a/src/transport/gnunet-helper-transport-wlan.c b/src/transport/gnunet-helper-transport-wlan.c index 7ad6c5175..68adadbe8 100644 --- a/src/transport/gnunet-helper-transport-wlan.c +++ b/src/transport/gnunet-helper-transport-wlan.c | |||
@@ -176,7 +176,6 @@ | |||
176 | #define MAXLINE 4096 | 176 | #define MAXLINE 4096 |
177 | 177 | ||
178 | 178 | ||
179 | |||
180 | /* ********* structure of messages of type ARPHRD_IEEE80211_PRISM *********** */ | 179 | /* ********* structure of messages of type ARPHRD_IEEE80211_PRISM *********** */ |
181 | 180 | ||
182 | /** | 181 | /** |
@@ -465,7 +464,6 @@ enum RadiotapType | |||
465 | #define IEEE80211_RADIOTAP_PRESENT_EXTEND_MASK (1 << IEEE80211_RADIOTAP_EXT) | 464 | #define IEEE80211_RADIOTAP_PRESENT_EXTEND_MASK (1 << IEEE80211_RADIOTAP_EXT) |
466 | 465 | ||
467 | 466 | ||
468 | |||
469 | /** | 467 | /** |
470 | * Bit in IEEE80211_RADIOTAP_FLAGS (which we might get | 468 | * Bit in IEEE80211_RADIOTAP_FLAGS (which we might get |
471 | * as part of a 'struct Ieee80211RadiotapHeader' extension | 469 | * as part of a 'struct Ieee80211RadiotapHeader' extension |
@@ -651,7 +649,6 @@ struct RadiotapTransmissionHeader | |||
651 | IEEE80211_RADIOTAP_TX_FLAGS)) | 649 | IEEE80211_RADIOTAP_TX_FLAGS)) |
652 | 650 | ||
653 | 651 | ||
654 | |||
655 | /** | 652 | /** |
656 | * struct Ieee80211RadiotapHeaderIterator - tracks walk through present radiotap arguments | 653 | * struct Ieee80211RadiotapHeaderIterator - tracks walk through present radiotap arguments |
657 | * in the radiotap header. Used when we parse radiotap packets received from the kernel. | 654 | * in the radiotap header. Used when we parse radiotap packets received from the kernel. |
@@ -770,7 +767,6 @@ static struct SendBuffer write_pout; | |||
770 | static struct SendBuffer write_std; | 767 | static struct SendBuffer write_std; |
771 | 768 | ||
772 | 769 | ||
773 | |||
774 | /* *********** specialized version of server_mst.c begins here ********** */ | 770 | /* *********** specialized version of server_mst.c begins here ********** */ |
775 | 771 | ||
776 | /** | 772 | /** |
@@ -1031,6 +1027,7 @@ mst_destroy (struct MessageStreamTokenizer *mst) | |||
1031 | free (mst); | 1027 | free (mst); |
1032 | } | 1028 | } |
1033 | 1029 | ||
1030 | |||
1034 | /* ***************** end of server_mst.c clone ***************** **/ | 1031 | /* ***************** end of server_mst.c clone ***************** **/ |
1035 | 1032 | ||
1036 | 1033 | ||
@@ -1091,8 +1088,7 @@ ieee80211_radiotap_iterator_init (struct | |||
1091 | * check for insanity where the present bitmaps | 1088 | * check for insanity where the present bitmaps |
1092 | * keep claiming to extend up to or even beyond the | 1089 | * keep claiming to extend up to or even beyond the |
1093 | * stated radiotap header length | 1090 | * stated radiotap header length |
1094 | */ | 1091 | */if (iterator->arg - ((uint8_t*) iterator->rtheader) > |
1095 | if (iterator->arg - ((uint8_t*) iterator->rtheader) > | ||
1096 | iterator->max_length) | 1092 | iterator->max_length) |
1097 | return -1; | 1093 | return -1; |
1098 | } | 1094 | } |
@@ -1101,8 +1097,7 @@ ieee80211_radiotap_iterator_init (struct | |||
1101 | * no need to check again for blowing past stated radiotap | 1097 | * no need to check again for blowing past stated radiotap |
1102 | * header length, becuase ieee80211_radiotap_iterator_next | 1098 | * header length, becuase ieee80211_radiotap_iterator_next |
1103 | * checks it before it is dereferenced | 1099 | * checks it before it is dereferenced |
1104 | */ | 1100 | */} |
1105 | } | ||
1106 | /* we are all initialized happily */ | 1101 | /* we are all initialized happily */ |
1107 | return 0; | 1102 | return 0; |
1108 | } | 1103 | } |
@@ -1137,9 +1132,7 @@ ieee80211_radiotap_iterator_next (struct | |||
1137 | * | 1132 | * |
1138 | * upper nybble: content alignment for arg | 1133 | * upper nybble: content alignment for arg |
1139 | * lower nybble: content length for arg | 1134 | * lower nybble: content length for arg |
1140 | */ | 1135 | */static const uint8_t rt_sizes[] = { |
1141 | |||
1142 | static const uint8_t rt_sizes[] = { | ||
1143 | [IEEE80211_RADIOTAP_TSFT] = 0x88, | 1136 | [IEEE80211_RADIOTAP_TSFT] = 0x88, |
1144 | [IEEE80211_RADIOTAP_FLAGS] = 0x11, | 1137 | [IEEE80211_RADIOTAP_FLAGS] = 0x11, |
1145 | [IEEE80211_RADIOTAP_RATE] = 0x11, | 1138 | [IEEE80211_RADIOTAP_RATE] = 0x11, |
@@ -1198,8 +1191,7 @@ ieee80211_radiotap_iterator_next (struct | |||
1198 | * radiotap header. There is no guarantee that the radiotap | 1191 | * radiotap header. There is no guarantee that the radiotap |
1199 | * header itself is aligned on any kind of boundary, thus we | 1192 | * header itself is aligned on any kind of boundary, thus we |
1200 | * need to really look at the delta here. | 1193 | * need to really look at the delta here. |
1201 | */ | 1194 | */wanted_alignment = rt_sizes[iterator->arg_index] >> 4; |
1202 | wanted_alignment = rt_sizes[iterator->arg_index] >> 4; | ||
1203 | unalignment = (((void *) iterator->arg) - ((void *) iterator->rtheader)) | 1195 | unalignment = (((void *) iterator->arg) - ((void *) iterator->rtheader)) |
1204 | & (wanted_alignment - 1); | 1196 | & (wanted_alignment - 1); |
1205 | if (0 != unalignment) | 1197 | if (0 != unalignment) |
@@ -1224,8 +1216,7 @@ ieee80211_radiotap_iterator_next (struct | |||
1224 | * claims to have more arg content than the length of the | 1216 | * claims to have more arg content than the length of the |
1225 | * radiotap section. We will normally end up equalling this | 1217 | * radiotap section. We will normally end up equalling this |
1226 | * max_length on the last arg, never exceeding it. | 1218 | * max_length on the last arg, never exceeding it. |
1227 | */ | 1219 | */if ((((void *) iterator->arg) - ((void *) iterator->rtheader)) > |
1228 | if ((((void *) iterator->arg) - ((void *) iterator->rtheader)) > | ||
1229 | iterator->max_length) | 1220 | iterator->max_length) |
1230 | return -1; | 1221 | return -1; |
1231 | } | 1222 | } |
@@ -1365,8 +1356,8 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len) | |||
1365 | 1356 | ||
1366 | crc = calc_crc_osdep (buf, len); | 1357 | crc = calc_crc_osdep (buf, len); |
1367 | buf += len; | 1358 | buf += len; |
1368 | if ((((crc) & 0xFF) == buf[0])&&(((crc >> 8) & 0xFF) == buf[1])&& | 1359 | if ((((crc) & 0xFF) == buf[0]) && (((crc >> 8) & 0xFF) == buf[1]) && |
1369 | ( ((crc >> 16) & 0xFF) == buf[2]) &&( ((crc >> 24) & 0xFF) == buf[3]) ) | 1360 | ( ((crc >> 16) & 0xFF) == buf[2]) && ( ((crc >> 24) & 0xFF) == buf[3]) ) |
1370 | return 0; | 1361 | return 0; |
1371 | return 1; | 1362 | return 1; |
1372 | } | 1363 | } |
@@ -1386,11 +1377,11 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len) | |||
1386 | static int | 1377 | static int |
1387 | get_channel_from_frequency (int32_t frequency) | 1378 | get_channel_from_frequency (int32_t frequency) |
1388 | { | 1379 | { |
1389 | if ((frequency >= 2412)&&(frequency <= 2472)) | 1380 | if ((frequency >= 2412) && (frequency <= 2472)) |
1390 | return (frequency - 2407) / 5; | 1381 | return (frequency - 2407) / 5; |
1391 | if (frequency == 2484) | 1382 | if (frequency == 2484) |
1392 | return 14; | 1383 | return 14; |
1393 | if ((frequency >= 5000)&&(frequency <= 6100)) | 1384 | if ((frequency >= 5000) && (frequency <= 6100)) |
1394 | return (frequency - 5000) / 5; | 1385 | return (frequency - 5000) / 5; |
1395 | return -1; | 1386 | return -1; |
1396 | } | 1387 | } |
@@ -2191,4 +2182,5 @@ main (int argc, char *argv[]) | |||
2191 | return 1; /* we never exit 'normally' */ | 2182 | return 1; /* we never exit 'normally' */ |
2192 | } | 2183 | } |
2193 | 2184 | ||
2185 | |||
2194 | /* end of gnunet-helper-transport-wlan.c */ | 2186 | /* end of gnunet-helper-transport-wlan.c */ |
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c index 66a836b84..8d68d90a6 100644 --- a/src/transport/gnunet-service-tng.c +++ b/src/transport/gnunet-service-tng.c | |||
@@ -4734,8 +4734,7 @@ consider_sending_fc (void *cls) | |||
4734 | then. See vl->last_fc_rtt! NOTE: to do this properly, we also | 4734 | then. See vl->last_fc_rtt! NOTE: to do this properly, we also |
4735 | need an estimate for the bandwidth-delay-product for the entire | 4735 | need an estimate for the bandwidth-delay-product for the entire |
4736 | VL, as that determines "significantly". We have the delay, but | 4736 | VL, as that determines "significantly". We have the delay, but |
4737 | the bandwidth statistics need to be added for the VL!*/ | 4737 | the bandwidth statistics need to be added for the VL!*/(void) duration; |
4738 | (void) duration; | ||
4739 | 4738 | ||
4740 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 4739 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
4741 | "Sending FC seq %u to %s with new window %llu\n", | 4740 | "Sending FC seq %u to %s with new window %llu\n", |
@@ -5218,8 +5217,7 @@ handle_raw_message (void *cls, const struct GNUNET_MessageHeader *mh) | |||
5218 | we pass this on, CORE would be confused (link down, messages | 5217 | we pass this on, CORE would be confused (link down, messages |
5219 | arrive). We should investigate more if this happens often, | 5218 | arrive). We should investigate more if this happens often, |
5220 | or in a persistent manner, and possibly do "something" about | 5219 | or in a persistent manner, and possibly do "something" about |
5221 | it. Thus logging as error for now. */ | 5220 | it. Thus logging as error for now. */GNUNET_break_op (0); |
5222 | GNUNET_break_op (0); | ||
5223 | GNUNET_STATISTICS_update (GST_stats, | 5221 | GNUNET_STATISTICS_update (GST_stats, |
5224 | "# CORE messages droped (virtual link still down)", | 5222 | "# CORE messages droped (virtual link still down)", |
5225 | 1, | 5223 | 1, |
@@ -8643,8 +8641,7 @@ select_best_pending_from_link (struct PendingMessageScoreContext *sc, | |||
8643 | given message fits _this_ queue, and do not consider how well other | 8641 | given message fits _this_ queue, and do not consider how well other |
8644 | queues might suit the message. Taking other queues into consideration | 8642 | queues might suit the message. Taking other queues into consideration |
8645 | may further improve the result, but could also be expensive | 8643 | may further improve the result, but could also be expensive |
8646 | in terms of CPU time. */ | 8644 | in terms of CPU time. */long long sc_score = sc->frag * 40 + sc->relb * 20 + sc->real_overhead; |
8647 | long long sc_score = sc->frag * 40 + sc->relb * 20 + sc->real_overhead; | ||
8648 | long long pm_score = frag * 40 + relb * 20 + real_overhead; | 8645 | long long pm_score = frag * 40 + relb * 20 + real_overhead; |
8649 | long long time_delta = | 8646 | long long time_delta = |
8650 | (sc->best->next_attempt.abs_value_us - pos->next_attempt.abs_value_us) | 8647 | (sc->best->next_attempt.abs_value_us - pos->next_attempt.abs_value_us) |
@@ -8848,8 +8845,7 @@ transmit_on_queue (void *cls) | |||
8848 | via DV (and thus the ultimate target of the pending message is for | 8845 | via DV (and thus the ultimate target of the pending message is for |
8849 | a different virtual link than the one of the queue), then we need | 8846 | a different virtual link than the one of the queue), then we need |
8850 | to use up not only the window of the direct link but also the | 8847 | to use up not only the window of the direct link but also the |
8851 | flow control window for the DV link! */ | 8848 | flow control window for the DV link! */pm->vl->outbound_fc_window_size_used += pm->bytes_msg; |
8852 | pm->vl->outbound_fc_window_size_used += pm->bytes_msg; | ||
8853 | 8849 | ||
8854 | if (pm->vl != queue->neighbour->vl) | 8850 | if (pm->vl != queue->neighbour->vl) |
8855 | { | 8851 | { |
@@ -8888,8 +8884,7 @@ transmit_on_queue (void *cls) | |||
8888 | 8884 | ||
8889 | OPTIMIZE: Note that in the future this heuristic should likely | 8885 | OPTIMIZE: Note that in the future this heuristic should likely |
8890 | be improved further (measure RTT stability, consider message | 8886 | be improved further (measure RTT stability, consider message |
8891 | urgency and size when delaying ACKs, etc.) */ | 8887 | urgency and size when delaying ACKs, etc.) */update_pm_next_attempt (pm, |
8892 | update_pm_next_attempt (pm, | ||
8893 | GNUNET_TIME_relative_to_absolute ( | 8888 | GNUNET_TIME_relative_to_absolute ( |
8894 | GNUNET_TIME_relative_multiply (queue->pd.aged_rtt, | 8889 | GNUNET_TIME_relative_multiply (queue->pd.aged_rtt, |
8895 | 4))); | 8890 | 4))); |
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 853a61127..7638839cc 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -2390,9 +2390,7 @@ test_blacklisted (void *cls, const struct GNUNET_PeerIdentity *key, void *value) | |||
2390 | * If (NULL != transport_name) we look for a transport specific entry: | 2390 | * If (NULL != transport_name) we look for a transport specific entry: |
2391 | * if (transport_name == be) forbidden | 2391 | * if (transport_name == be) forbidden |
2392 | * | 2392 | * |
2393 | */ | 2393 | */GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2394 | |||
2395 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2396 | "Comparing BL request for peer `%4s':`%s' with BL entry: `%s'\n", | 2394 | "Comparing BL request for peer `%4s':`%s' with BL entry: `%s'\n", |
2397 | GNUNET_i2s (key), | 2395 | GNUNET_i2s (key), |
2398 | (NULL == transport_name) ? "unspecified" : transport_name, | 2396 | (NULL == transport_name) ? "unspecified" : transport_name, |
diff --git a/src/transport/gnunet-service-transport.h b/src/transport/gnunet-service-transport.h index 3c2ca5a08..acb1de395 100644 --- a/src/transport/gnunet-service-transport.h +++ b/src/transport/gnunet-service-transport.h | |||
@@ -133,7 +133,6 @@ GST_blacklist_add_peer (const struct GNUNET_PeerIdentity *peer, | |||
133 | struct GST_BlacklistCheck; | 133 | struct GST_BlacklistCheck; |
134 | 134 | ||
135 | 135 | ||
136 | |||
137 | /** | 136 | /** |
138 | * Test if a peer/transport combination is blacklisted. | 137 | * Test if a peer/transport combination is blacklisted. |
139 | * | 138 | * |
@@ -231,7 +230,5 @@ void | |||
231 | GST_clients_broadcast_disconnect (const struct GNUNET_PeerIdentity *peer); | 230 | GST_clients_broadcast_disconnect (const struct GNUNET_PeerIdentity *peer); |
232 | 231 | ||
233 | 232 | ||
234 | |||
235 | |||
236 | #endif | 233 | #endif |
237 | /* end of file gnunet-service-transport_plugins.h */ | 234 | /* end of file gnunet-service-transport_plugins.h */ |
diff --git a/src/transport/gnunet-service-transport_ats.c b/src/transport/gnunet-service-transport_ats.c index 9c262dbdf..130311e15 100644 --- a/src/transport/gnunet-service-transport_ats.c +++ b/src/transport/gnunet-service-transport_ats.c | |||
@@ -333,7 +333,7 @@ GST_ats_block_address (const struct GNUNET_HELLO_Address *address, | |||
333 | return; /* our own, ignore! */ | 333 | return; /* our own, ignore! */ |
334 | ai = find_ai (address, | 334 | ai = find_ai (address, |
335 | session); | 335 | session); |
336 | if ((NULL == ai)||(NULL == ai->ar)) | 336 | if ((NULL == ai) || (NULL == ai->ar)) |
337 | { | 337 | { |
338 | /* The address is already gone/blocked, this can happen during a blacklist | 338 | /* The address is already gone/blocked, this can happen during a blacklist |
339 | * callback. */ | 339 | * callback. */ |
@@ -366,8 +366,7 @@ GST_ats_block_address (const struct GNUNET_HELLO_Address *address, | |||
366 | above played out: it was either freed in | 366 | above played out: it was either freed in |
367 | #GNUNET_ATS_address_del_session() because it was | 367 | #GNUNET_ATS_address_del_session() because it was |
368 | incoming, or explicitly in | 368 | incoming, or explicitly in |
369 | #GNUNET_ATS_address_del_session(). */ | 369 | #GNUNET_ATS_address_del_session(). */ai->ar = NULL; |
370 | ai->ar = NULL; | ||
371 | 370 | ||
372 | /* determine when the address should come back to life */ | 371 | /* determine when the address should come back to life */ |
373 | ai->blocked = GNUNET_TIME_relative_to_absolute (ai->back_off); | 372 | ai->blocked = GNUNET_TIME_relative_to_absolute (ai->back_off); |
@@ -559,8 +558,7 @@ GST_ats_new_session (const struct GNUNET_HELLO_Address *address, | |||
559 | other part of the code could not tell if it just created a new | 558 | other part of the code could not tell if it just created a new |
560 | session or just got one recycled from the plugin; hence, we may | 559 | session or just got one recycled from the plugin; hence, we may |
561 | be called with "new" session even for an "old" session; in that | 560 | be called with "new" session even for an "old" session; in that |
562 | case, check that this is the case, but just ignore it. */ | 561 | case, check that this is the case, but just ignore it. */GNUNET_assert (NULL != (find_ai (address, session))); |
563 | GNUNET_assert (NULL != (find_ai (address, session))); | ||
564 | return; | 562 | return; |
565 | } | 563 | } |
566 | GNUNET_assert (NULL == ai->session); | 564 | GNUNET_assert (NULL == ai->session); |
@@ -679,8 +677,7 @@ GST_ats_del_session (const struct GNUNET_HELLO_Address *address, | |||
679 | above played out: it was either freed in | 677 | above played out: it was either freed in |
680 | #GNUNET_ATS_address_del_session() because it was | 678 | #GNUNET_ATS_address_del_session() because it was |
681 | incoming, or explicitly in | 679 | incoming, or explicitly in |
682 | #GNUNET_ATS_address_del_session(). */ | 680 | #GNUNET_ATS_address_del_session(). */ai->ar = NULL; |
683 | ai->ar = NULL; | ||
684 | } | 681 | } |
685 | destroy_ai (ai); | 682 | destroy_ai (ai); |
686 | return; | 683 | return; |
@@ -919,4 +916,5 @@ GST_ats_done () | |||
919 | p2a = NULL; | 916 | p2a = NULL; |
920 | } | 917 | } |
921 | 918 | ||
919 | |||
922 | /* end of gnunet-service-transport_ats.c */ | 920 | /* end of gnunet-service-transport_ats.c */ |
diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c index 47ae5b981..04d1774c0 100644 --- a/src/transport/gnunet-service-transport_manipulation.c +++ b/src/transport/gnunet-service-transport_manipulation.c | |||
@@ -582,4 +582,5 @@ GST_manipulation_stop () | |||
582 | } | 582 | } |
583 | } | 583 | } |
584 | 584 | ||
585 | |||
585 | /* end of file gnunet-service-transport_manipulation.c */ | 586 | /* end of file gnunet-service-transport_manipulation.c */ |
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 3de10d108..9c6cebc24 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -3568,9 +3568,7 @@ GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message, | |||
3568 | We expect a ACK: | 3568 | We expect a ACK: |
3569 | - If a remote peer has sent a SYN, we responded with a SYN_ACK and | 3569 | - If a remote peer has sent a SYN, we responded with a SYN_ACK and |
3570 | now wait for the ACK to finally be connected | 3570 | now wait for the ACK to finally be connected |
3571 | - If we sent a SYN_ACK to this peer before */ | 3571 | - If we sent a SYN_ACK to this peer before */if (((GNUNET_TRANSPORT_PS_SYN_RECV_ACK != n->state) && |
3572 | |||
3573 | if (((GNUNET_TRANSPORT_PS_SYN_RECV_ACK != n->state) && | ||
3574 | (ACK_SEND_ACK != n->ack_state)) || | 3572 | (ACK_SEND_ACK != n->ack_state)) || |
3575 | (NULL == n->primary_address.address)) | 3573 | (NULL == n->primary_address.address)) |
3576 | { | 3574 | { |
@@ -3606,8 +3604,7 @@ GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message, | |||
3606 | * an ACK. | 3604 | * an ACK. |
3607 | * That suggests that the primary_address used to be non-NULL, but maybe it | 3605 | * That suggests that the primary_address used to be non-NULL, but maybe it |
3608 | * got reset to NULL without the state being changed appropriately? | 3606 | * got reset to NULL without the state being changed appropriately? |
3609 | */ | 3607 | */GNUNET_break (0); |
3610 | GNUNET_break (0); | ||
3611 | return GNUNET_OK; | 3608 | return GNUNET_OK; |
3612 | } | 3609 | } |
3613 | 3610 | ||
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index ec8600b7f..631b0a8f8 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -81,8 +81,6 @@ enum GNUNET_TRANSPORT_ValidationState | |||
81 | }; | 81 | }; |
82 | 82 | ||
83 | 83 | ||
84 | |||
85 | |||
86 | /** | 84 | /** |
87 | * How long is a PONG signature valid? We'll recycle a signature until | 85 | * How long is a PONG signature valid? We'll recycle a signature until |
88 | * 1/4 of this time is remaining. PONGs should expire so that if our | 86 | * 1/4 of this time is remaining. PONGs should expire so that if our |
@@ -993,9 +991,7 @@ GST_validation_start (unsigned int max_fds) | |||
993 | * - "fast start": run validation immediately | 991 | * - "fast start": run validation immediately |
994 | * - have delay of (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value_us) / (max_fds / 2) | 992 | * - have delay of (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value_us) / (max_fds / 2) |
995 | * (300 sec / ~150 == ~2 sec.) between two validations | 993 | * (300 sec / ~150 == ~2 sec.) between two validations |
996 | */ | 994 | */validation_next = GNUNET_TIME_absolute_get (); |
997 | |||
998 | validation_next = GNUNET_TIME_absolute_get (); | ||
999 | validation_delay.rel_value_us = | 995 | validation_delay.rel_value_us = |
1000 | (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value_us) / (max_fds / 2); | 996 | (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value_us) / (max_fds / 2); |
1001 | validations_fast_start_threshold = (max_fds / 2); | 997 | validations_fast_start_threshold = (max_fds / 2); |
diff --git a/src/transport/gnunet-transport-profiler.c b/src/transport/gnunet-transport-profiler.c index b09361d14..6c13cf059 100644 --- a/src/transport/gnunet-transport-profiler.c +++ b/src/transport/gnunet-transport-profiler.c | |||
@@ -621,4 +621,5 @@ main (int argc, char *const *argv) | |||
621 | return 1; | 621 | return 1; |
622 | } | 622 | } |
623 | 623 | ||
624 | |||
624 | /* end of gnunet-transport-profiler.c */ | 625 | /* end of gnunet-transport-profiler.c */ |
diff --git a/src/transport/gnunet-transport-wlan-sender.c b/src/transport/gnunet-transport-wlan-sender.c index 191ea8619..5256ec7be 100644 --- a/src/transport/gnunet-transport-wlan-sender.c +++ b/src/transport/gnunet-transport-wlan-sender.c | |||
@@ -65,6 +65,7 @@ getRadiotapHeader (struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage *header, | |||
65 | return GNUNET_YES; | 65 | return GNUNET_YES; |
66 | } | 66 | } |
67 | 67 | ||
68 | |||
68 | /** | 69 | /** |
69 | * function to generate the wlan hardware header for one packet | 70 | * function to generate the wlan hardware header for one packet |
70 | * @param Header address to write the header to | 71 | * @param Header address to write the header to |
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index f0d9d30c3..5a437b660 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c | |||
@@ -1433,4 +1433,5 @@ main (int argc, char *const *argv) | |||
1433 | return 1; | 1433 | return 1; |
1434 | } | 1434 | } |
1435 | 1435 | ||
1436 | |||
1436 | /* end of gnunet-transport.c */ | 1437 | /* end of gnunet-transport.c */ |
diff --git a/src/transport/ieee80211_radiotap.h b/src/transport/ieee80211_radiotap.h index 9bdfa02f5..1a79cf214 100644 --- a/src/transport/ieee80211_radiotap.h +++ b/src/transport/ieee80211_radiotap.h | |||
@@ -272,4 +272,5 @@ ieee80211_get_radiotap_len (unsigned char *data) | |||
272 | return get_unaligned_le16 ((const u8 *) &hdr->it_len); | 272 | return get_unaligned_le16 ((const u8 *) &hdr->it_len); |
273 | } | 273 | } |
274 | 274 | ||
275 | |||
275 | #endif /* IEEE80211_RADIOTAP_H */ | 276 | #endif /* IEEE80211_RADIOTAP_H */ |
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index 98ab6544f..87cd7ead2 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -703,6 +703,8 @@ client_log (CURL *curl, | |||
703 | text); | 703 | text); |
704 | return 0; | 704 | return 0; |
705 | } | 705 | } |
706 | |||
707 | |||
706 | #endif | 708 | #endif |
707 | 709 | ||
708 | /** | 710 | /** |
@@ -1504,6 +1506,8 @@ open_tcp_stealth_socket_cb (void *clientp, | |||
1504 | return CURL_SOCKET_BAD; | 1506 | return CURL_SOCKET_BAD; |
1505 | } | 1507 | } |
1506 | } | 1508 | } |
1509 | |||
1510 | |||
1507 | #endif | 1511 | #endif |
1508 | 1512 | ||
1509 | 1513 | ||
@@ -2528,4 +2532,5 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls) | |||
2528 | return api; | 2532 | return api; |
2529 | } | 2533 | } |
2530 | 2534 | ||
2535 | |||
2531 | /* end of plugin_transport_http_client.c */ | 2536 | /* end of plugin_transport_http_client.c */ |
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c index 6d3ee3429..2bcab42b4 100644 --- a/src/transport/plugin_transport_http_common.c +++ b/src/transport/plugin_transport_http_common.c | |||
@@ -173,6 +173,7 @@ http_split_address (const char *addr) | |||
173 | return sp; | 173 | return sp; |
174 | } | 174 | } |
175 | 175 | ||
176 | |||
176 | /** | 177 | /** |
177 | * Closure for #append_port(). | 178 | * Closure for #append_port(). |
178 | */ | 179 | */ |
@@ -640,6 +641,7 @@ http_common_plugin_address_to_string (const char *plugin, | |||
640 | return NULL; | 641 | return NULL; |
641 | } | 642 | } |
642 | 643 | ||
644 | |||
643 | /** | 645 | /** |
644 | * Function called to convert a string address to | 646 | * Function called to convert a string address to |
645 | * a binary address. | 647 | * a binary address. |
@@ -943,5 +945,4 @@ http_common_get_network_for_address (struct | |||
943 | } | 945 | } |
944 | 946 | ||
945 | 947 | ||
946 | |||
947 | /* end of plugin_transport_http_common.c */ | 948 | /* end of plugin_transport_http_common.c */ |
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 6e106fe78..20bdb6273 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <regex.h> | 35 | #include <regex.h> |
36 | 36 | ||
37 | 37 | ||
38 | |||
39 | #if BUILD_HTTPS | 38 | #if BUILD_HTTPS |
40 | #define PLUGIN_NAME "https_server" | 39 | #define PLUGIN_NAME "https_server" |
41 | #define LIBGNUNET_PLUGIN_TRANSPORT_INIT \ | 40 | #define LIBGNUNET_PLUGIN_TRANSPORT_INIT \ |
@@ -2115,6 +2114,8 @@ server_load_file (const char *file) | |||
2115 | GNUNET_DISK_file_close (gn_file); | 2114 | GNUNET_DISK_file_close (gn_file); |
2116 | return text; | 2115 | return text; |
2117 | } | 2116 | } |
2117 | |||
2118 | |||
2118 | #endif | 2119 | #endif |
2119 | 2120 | ||
2120 | 2121 | ||
@@ -2242,6 +2243,8 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin) | |||
2242 | "TLS certificate loaded\n"); | 2243 | "TLS certificate loaded\n"); |
2243 | return res; | 2244 | return res; |
2244 | } | 2245 | } |
2246 | |||
2247 | |||
2245 | #endif | 2248 | #endif |
2246 | 2249 | ||
2247 | 2250 | ||
@@ -2358,7 +2361,6 @@ server_start (struct HTTP_Server_Plugin *plugin) | |||
2358 | #endif | 2361 | #endif |
2359 | 2362 | ||
2360 | 2363 | ||
2361 | |||
2362 | plugin->server_v4 = NULL; | 2364 | plugin->server_v4 = NULL; |
2363 | if (GNUNET_YES == plugin->use_ipv4) | 2365 | if (GNUNET_YES == plugin->use_ipv4) |
2364 | { | 2366 | { |
@@ -2557,7 +2559,6 @@ server_remove_address (void *cls, | |||
2557 | } | 2559 | } |
2558 | 2560 | ||
2559 | 2561 | ||
2560 | |||
2561 | /** | 2562 | /** |
2562 | * Our external IP address/port mapping has changed. | 2563 | * Our external IP address/port mapping has changed. |
2563 | * | 2564 | * |
@@ -3598,4 +3599,5 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls) | |||
3598 | return api; | 3599 | return api; |
3599 | } | 3600 | } |
3600 | 3601 | ||
3602 | |||
3601 | /* end of plugin_transport_http_server.c */ | 3603 | /* end of plugin_transport_http_server.c */ |
diff --git a/src/transport/plugin_transport_smtp.c b/src/transport/plugin_transport_smtp.c index 7fbbc9126..330023118 100644 --- a/src/transport/plugin_transport_smtp.c +++ b/src/transport/plugin_transport_smtp.c | |||
@@ -257,6 +257,7 @@ END: | |||
257 | return NULL; | 257 | return NULL; |
258 | } | 258 | } |
259 | 259 | ||
260 | |||
260 | /* *************** API implementation *************** */ | 261 | /* *************** API implementation *************** */ |
261 | 262 | ||
262 | /** | 263 | /** |
@@ -287,6 +288,7 @@ api_verify_hello (const GNUNET_MessageHello *hello) | |||
287 | return GNUNET_OK; | 288 | return GNUNET_OK; |
288 | } | 289 | } |
289 | 290 | ||
291 | |||
290 | /** | 292 | /** |
291 | * Create a hello-Message for the current node. The hello is created | 293 | * Create a hello-Message for the current node. The hello is created |
292 | * without signature and without a timestamp. The GNUnet core will | 294 | * without signature and without a timestamp. The GNUnet core will |
@@ -336,6 +338,7 @@ api_create_hello () | |||
336 | return msg; | 338 | return msg; |
337 | } | 339 | } |
338 | 340 | ||
341 | |||
339 | struct GetMessageClosure | 342 | struct GetMessageClosure |
340 | { | 343 | { |
341 | unsigned int esize; | 344 | unsigned int esize; |
@@ -361,6 +364,7 @@ get_message (void **buf, int *len, void *cls) | |||
361 | return gmc->ebody; | 364 | return gmc->ebody; |
362 | } | 365 | } |
363 | 366 | ||
367 | |||
364 | /** | 368 | /** |
365 | * Send a message to the specified remote node. | 369 | * Send a message to the specified remote node. |
366 | * | 370 | * |
@@ -529,6 +533,7 @@ api_send (GNUNET_TSession *tsession, const void *msg, const unsigned int size, | |||
529 | return GNUNET_OK; | 533 | return GNUNET_OK; |
530 | } | 534 | } |
531 | 535 | ||
536 | |||
532 | /** | 537 | /** |
533 | * Establish a connection to a remote node. | 538 | * Establish a connection to a remote node. |
534 | * @param hello the hello-Message for the target node | 539 | * @param hello the hello-Message for the target node |
@@ -551,6 +556,7 @@ api_connect (const GNUNET_MessageHello *hello, GNUNET_TSession **tsessionPtr, | |||
551 | return GNUNET_OK; | 556 | return GNUNET_OK; |
552 | } | 557 | } |
553 | 558 | ||
559 | |||
554 | /** | 560 | /** |
555 | * Disconnect from a remote node. | 561 | * Disconnect from a remote node. |
556 | * | 562 | * |
@@ -569,6 +575,7 @@ api_disconnect (GNUNET_TSession *tsession) | |||
569 | return GNUNET_OK; | 575 | return GNUNET_OK; |
570 | } | 576 | } |
571 | 577 | ||
578 | |||
572 | /** | 579 | /** |
573 | * Start the server process to receive inbound traffic. | 580 | * Start the server process to receive inbound traffic. |
574 | * @return GNUNET_OK on success, GNUNET_SYSERR if the operation failed | 581 | * @return GNUNET_OK on success, GNUNET_SYSERR if the operation failed |
@@ -589,6 +596,7 @@ api_start_transport_server () | |||
589 | return GNUNET_OK; | 596 | return GNUNET_OK; |
590 | } | 597 | } |
591 | 598 | ||
599 | |||
592 | /** | 600 | /** |
593 | * Shutdown the server process (stop receiving inbound traffic). Maybe | 601 | * Shutdown the server process (stop receiving inbound traffic). Maybe |
594 | * restarted later! | 602 | * restarted later! |
@@ -604,6 +612,7 @@ api_stop_transport_server () | |||
604 | return GNUNET_OK; | 612 | return GNUNET_OK; |
605 | } | 613 | } |
606 | 614 | ||
615 | |||
607 | /** | 616 | /** |
608 | * Convert SMTP hello to an IP address (always fails). | 617 | * Convert SMTP hello to an IP address (always fails). |
609 | */ | 618 | */ |
@@ -614,6 +623,7 @@ api_hello_to_address (const GNUNET_MessageHello *hello, void **sa, | |||
614 | return GNUNET_SYSERR; | 623 | return GNUNET_SYSERR; |
615 | } | 624 | } |
616 | 625 | ||
626 | |||
617 | /** | 627 | /** |
618 | * Always fails. | 628 | * Always fails. |
619 | */ | 629 | */ |
@@ -623,6 +633,7 @@ api_associate (GNUNET_TSession *tsession) | |||
623 | return GNUNET_SYSERR; /* SMTP connections can never be associated */ | 633 | return GNUNET_SYSERR; /* SMTP connections can never be associated */ |
624 | } | 634 | } |
625 | 635 | ||
636 | |||
626 | /** | 637 | /** |
627 | * Always succeeds (for now; we should look at adding | 638 | * Always succeeds (for now; we should look at adding |
628 | * frequency limits to SMTP in the future!). | 639 | * frequency limits to SMTP in the future!). |
@@ -634,6 +645,7 @@ api_test_would_try (GNUNET_TSession *tsession, unsigned int size, | |||
634 | return GNUNET_OK; /* we always try... */ | 645 | return GNUNET_OK; /* we always try... */ |
635 | } | 646 | } |
636 | 647 | ||
648 | |||
637 | /** | 649 | /** |
638 | * The exported method. Makes the core api available via a global and | 650 | * The exported method. Makes the core api available via a global and |
639 | * returns the smtp transport API. | 651 | * returns the smtp transport API. |
@@ -714,6 +726,7 @@ inittransport_smtp (struct GNUNET_CoreAPIForTransport *core) | |||
714 | return &smtpAPI; | 726 | return &smtpAPI; |
715 | } | 727 | } |
716 | 728 | ||
729 | |||
717 | void | 730 | void |
718 | donetransport_smtp () | 731 | donetransport_smtp () |
719 | { | 732 | { |
@@ -733,4 +746,5 @@ donetransport_smtp () | |||
733 | email = NULL; | 746 | email = NULL; |
734 | } | 747 | } |
735 | 748 | ||
749 | |||
736 | /* end of smtp.c */ | 750 | /* end of smtp.c */ |
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 36ff00dd8..ad0766af9 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -402,6 +402,7 @@ void | |||
402 | GNUNET_SERVER_client_set_user_context_ (struct GNUNET_SERVER_Client *client, | 402 | GNUNET_SERVER_client_set_user_context_ (struct GNUNET_SERVER_Client *client, |
403 | void *ptr, | 403 | void *ptr, |
404 | size_t size); | 404 | size_t size); |
405 | |||
405 | /** | 406 | /** |
406 | * Return user context associated with the given client. | 407 | * Return user context associated with the given client. |
407 | * | 408 | * |
@@ -1376,6 +1377,8 @@ get_server_addresses (const char *service_name, | |||
1376 | *addr_lens = saddrlens; | 1377 | *addr_lens = saddrlens; |
1377 | return resi; | 1378 | return resi; |
1378 | } | 1379 | } |
1380 | |||
1381 | |||
1379 | /* end ancient copy-and-paste */ | 1382 | /* end ancient copy-and-paste */ |
1380 | 1383 | ||
1381 | 1384 | ||
@@ -2447,8 +2450,7 @@ tcp_plugin_get_session (void *cls, const struct GNUNET_HELLO_Address *address) | |||
2447 | one TCP connection to any given peer at the same time. | 2450 | one TCP connection to any given peer at the same time. |
2448 | Without this, peers sometimes disagree about which of the TCP | 2451 | Without this, peers sometimes disagree about which of the TCP |
2449 | connections they should use, causing one side to believe that | 2452 | connections they should use, causing one side to believe that |
2450 | they transmit successfully, while the other receives nothing. */ | 2453 | they transmit successfully, while the other receives nothing. */return NULL; /* Refuse to have more than one TCP connection per |
2451 | return NULL; /* Refuse to have more than one TCP connection per | ||
2452 | peer pair at the same time. */ | 2454 | peer pair at the same time. */ |
2453 | } | 2455 | } |
2454 | 2456 | ||
@@ -2956,8 +2958,7 @@ handle_tcp_nat_probe (void *cls, | |||
2956 | * received the punch message and now wants us to use the new connection | 2958 | * received the punch message and now wants us to use the new connection |
2957 | * as the default for that peer. Do so and then send a WELCOME message | 2959 | * as the default for that peer. Do so and then send a WELCOME message |
2958 | * so we can really be connected! | 2960 | * so we can really be connected! |
2959 | */ | 2961 | */if (ntohs (message->size) != sizeof(struct TCP_NAT_ProbeMessage)) |
2960 | if (ntohs (message->size) != sizeof(struct TCP_NAT_ProbeMessage)) | ||
2961 | { | 2962 | { |
2962 | GNUNET_break_op (0); | 2963 | GNUNET_break_op (0); |
2963 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 2964 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
@@ -3962,4 +3963,5 @@ libgnunet_plugin_transport_tcp_done (void *cls) | |||
3962 | return NULL; | 3963 | return NULL; |
3963 | } | 3964 | } |
3964 | 3965 | ||
3966 | |||
3965 | /* end of plugin_transport_tcp.c */ | 3967 | /* end of plugin_transport_tcp.c */ |
diff --git a/src/transport/plugin_transport_template.c b/src/transport/plugin_transport_template.c index 54b3a277a..239f32f4a 100644 --- a/src/transport/plugin_transport_template.c +++ b/src/transport/plugin_transport_template.c | |||
@@ -180,6 +180,8 @@ notify_session_monitor (struct Plugin *plugin, | |||
180 | session, | 180 | session, |
181 | &info); | 181 | &info); |
182 | } | 182 | } |
183 | |||
184 | |||
183 | #endif | 185 | #endif |
184 | 186 | ||
185 | 187 | ||
@@ -337,7 +339,6 @@ template_plugin_address_pretty_printer (void *cls, const char *type, | |||
337 | } | 339 | } |
338 | 340 | ||
339 | 341 | ||
340 | |||
341 | /** | 342 | /** |
342 | * Another peer has suggested an address for this | 343 | * Another peer has suggested an address for this |
343 | * peer and transport plugin. Check that this could be a valid | 344 | * peer and transport plugin. Check that this could be a valid |
@@ -463,6 +464,8 @@ send_session_info_iter (void *cls, | |||
463 | GNUNET_TRANSPORT_SS_UP); | 464 | GNUNET_TRANSPORT_SS_UP); |
464 | return GNUNET_OK; | 465 | return GNUNET_OK; |
465 | } | 466 | } |
467 | |||
468 | |||
466 | #endif | 469 | #endif |
467 | 470 | ||
468 | 471 | ||
@@ -558,4 +561,5 @@ libgnunet_plugin_transport_template_done (void *cls) | |||
558 | return NULL; | 561 | return NULL; |
559 | } | 562 | } |
560 | 563 | ||
564 | |||
561 | /* end of plugin_transport_template.c */ | 565 | /* end of plugin_transport_template.c */ |
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 8d0bbea47..ef4fddb24 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -2016,8 +2016,7 @@ udp_plugin_send (void *cls, | |||
2016 | * For UDP we update session timeout only on receive, this will | 2016 | * For UDP we update session timeout only on receive, this will |
2017 | * cover keep alives, since remote peer will reply with keep alive | 2017 | * cover keep alives, since remote peer will reply with keep alive |
2018 | * responses! | 2018 | * responses! |
2019 | */ | 2019 | */if (udpmlen <= UDP_MTU) |
2020 | if (udpmlen <= UDP_MTU) | ||
2021 | { | 2020 | { |
2022 | /* unfragmented message */ | 2021 | /* unfragmented message */ |
2023 | udpw = GNUNET_malloc (sizeof(struct UDP_MessageWrapper) + udpmlen); | 2022 | udpw = GNUNET_malloc (sizeof(struct UDP_MessageWrapper) + udpmlen); |
@@ -3178,8 +3177,7 @@ analyze_send_error (struct Plugin *plugin, | |||
3178 | * This indicates that this system is IPv6 enabled, but does not | 3177 | * This indicates that this system is IPv6 enabled, but does not |
3179 | * have a valid global IPv6 address assigned or we do not have | 3178 | * have a valid global IPv6 address assigned or we do not have |
3180 | * connectivity | 3179 | * connectivity |
3181 | */ | 3180 | */LOG (GNUNET_ERROR_TYPE_WARNING | GNUNET_ERROR_TYPE_BULK, |
3182 | LOG (GNUNET_ERROR_TYPE_WARNING | GNUNET_ERROR_TYPE_BULK, | ||
3183 | _ ( | 3181 | _ ( |
3184 | "UDP could not transmit IPv6 message! " | 3182 | "UDP could not transmit IPv6 message! " |
3185 | "Please check your network configuration and disable IPv6 if your " | 3183 | "Please check your network configuration and disable IPv6 if your " |
@@ -3894,4 +3892,5 @@ libgnunet_plugin_transport_udp_done (void *cls) | |||
3894 | return NULL; | 3892 | return NULL; |
3895 | } | 3893 | } |
3896 | 3894 | ||
3895 | |||
3897 | /* end of plugin_transport_udp.c */ | 3896 | /* end of plugin_transport_udp.c */ |
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c index d8fdfe886..c85124b68 100644 --- a/src/transport/plugin_transport_udp_broadcasting.c +++ b/src/transport/plugin_transport_udp_broadcasting.c | |||
@@ -223,7 +223,7 @@ prepare_beacon (struct Plugin *plugin, | |||
223 | hello_size = GNUNET_HELLO_size ((struct GNUNET_HELLO_Message *) hello); | 223 | hello_size = GNUNET_HELLO_size ((struct GNUNET_HELLO_Message *) hello); |
224 | msg_size = hello_size + sizeof(struct UDP_Beacon_Message); | 224 | msg_size = hello_size + sizeof(struct UDP_Beacon_Message); |
225 | 225 | ||
226 | if ((hello_size < (sizeof(struct GNUNET_MessageHeader)))|| | 226 | if ((hello_size < (sizeof(struct GNUNET_MessageHeader))) || |
227 | (msg_size > (UDP_MTU))) | 227 | (msg_size > (UDP_MTU))) |
228 | return 0; | 228 | return 0; |
229 | 229 | ||
@@ -331,8 +331,7 @@ udp_ipv6_broadcast_send (void *cls) | |||
331 | if the scope ID is ignored, the kernel should just multicast | 331 | if the scope ID is ignored, the kernel should just multicast |
332 | on ALL interfaces, which is merely slightly less efficient; | 332 | on ALL interfaces, which is merely slightly less efficient; |
333 | in that case, we might want to revert to only doing this | 333 | in that case, we might want to revert to only doing this |
334 | once, and not per interface (hard to test...) */ | 334 | once, and not per interface (hard to test...) */plugin->ipv6_multicast_address.sin6_scope_id = s6->sin6_scope_id; |
335 | plugin->ipv6_multicast_address.sin6_scope_id = s6->sin6_scope_id; | ||
336 | sent = GNUNET_NETWORK_socket_sendto (plugin->sockv6, &buf, msg_size, | 335 | sent = GNUNET_NETWORK_socket_sendto (plugin->sockv6, &buf, msg_size, |
337 | (const struct sockaddr *) | 336 | (const struct sockaddr *) |
338 | &plugin->ipv6_multicast_address, | 337 | &plugin->ipv6_multicast_address, |
@@ -346,8 +345,7 @@ udp_ipv6_broadcast_send (void *cls) | |||
346 | * | 345 | * |
347 | * This indicates that this system is IPv6 enabled, but does not | 346 | * This indicates that this system is IPv6 enabled, but does not |
348 | * have a valid global IPv6 address assigned | 347 | * have a valid global IPv6 address assigned |
349 | */ | 348 | */GNUNET_log (GNUNET_ERROR_TYPE_BULK | GNUNET_ERROR_TYPE_WARNING, |
350 | GNUNET_log (GNUNET_ERROR_TYPE_BULK | GNUNET_ERROR_TYPE_WARNING, | ||
351 | "Network connectivity is down, cannot send beacon!\n"); | 349 | "Network connectivity is down, cannot send beacon!\n"); |
352 | } | 350 | } |
353 | else | 351 | else |
@@ -492,8 +490,7 @@ iface_proc (void *cls, | |||
492 | * group in the normal IPv6 routing table and using the resulting | 490 | * group in the normal IPv6 routing table and using the resulting |
493 | * interface; we do this for each interface, so no need to use | 491 | * interface; we do this for each interface, so no need to use |
494 | * zero (anymore...). | 492 | * zero (anymore...). |
495 | */ | 493 | */multicastRequest.ipv6mr_interface = s6->sin6_scope_id; |
496 | multicastRequest.ipv6mr_interface = s6->sin6_scope_id; | ||
497 | 494 | ||
498 | /* Join the multicast group */ | 495 | /* Join the multicast group */ |
499 | if (GNUNET_OK != | 496 | if (GNUNET_OK != |
@@ -646,4 +643,5 @@ stop_broadcast (struct Plugin *plugin) | |||
646 | } | 643 | } |
647 | } | 644 | } |
648 | 645 | ||
646 | |||
649 | /* end of plugin_transport_udp_broadcasting.c */ | 647 | /* end of plugin_transport_udp_broadcasting.c */ |
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 42d16f131..083a1cf7f 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c | |||
@@ -1886,4 +1886,5 @@ libgnunet_plugin_transport_unix_done (void *cls) | |||
1886 | return NULL; | 1886 | return NULL; |
1887 | } | 1887 | } |
1888 | 1888 | ||
1889 | |||
1889 | /* end of plugin_transport_unix.c */ | 1890 | /* end of plugin_transport_unix.c */ |
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index 570a39ed7..d831a7b78 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -102,7 +102,6 @@ | |||
102 | #endif | 102 | #endif |
103 | 103 | ||
104 | 104 | ||
105 | |||
106 | /** | 105 | /** |
107 | * Functions with this signature are called whenever a | 106 | * Functions with this signature are called whenever a |
108 | * complete message is received by the tokenizer. | 107 | * complete message is received by the tokenizer. |
@@ -876,7 +875,6 @@ session_timeout (void *cls) | |||
876 | } | 875 | } |
877 | 876 | ||
878 | 877 | ||
879 | |||
880 | /** | 878 | /** |
881 | * Lookup a new session | 879 | * Lookup a new session |
882 | * | 880 | * |
@@ -2203,7 +2201,6 @@ wlan_plugin_setup_monitor (void *cls, | |||
2203 | } | 2201 | } |
2204 | 2202 | ||
2205 | 2203 | ||
2206 | |||
2207 | /** | 2204 | /** |
2208 | * Function that will be called whenever the transport service wants to | 2205 | * Function that will be called whenever the transport service wants to |
2209 | * notify the plugin that a session is still active and in use and | 2206 | * notify the plugin that a session is still active and in use and |
diff --git a/src/transport/plugin_transport_wlan.h b/src/transport/plugin_transport_wlan.h index 5fe9f166f..9ba9d2771 100644 --- a/src/transport/plugin_transport_wlan.h +++ b/src/transport/plugin_transport_wlan.h | |||
@@ -153,7 +153,6 @@ struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame | |||
153 | } GNUNET_PACKED; | 153 | } GNUNET_PACKED; |
154 | 154 | ||
155 | 155 | ||
156 | |||
157 | /** | 156 | /** |
158 | * Message from the plugin to the WLAN helper: send the given message with the | 157 | * Message from the plugin to the WLAN helper: send the given message with the |
159 | * given connection parameters. | 158 | * given connection parameters. |
diff --git a/src/transport/tcp_server_legacy.c b/src/transport/tcp_server_legacy.c index 1a1d493cd..59b4fc20a 100644 --- a/src/transport/tcp_server_legacy.c +++ b/src/transport/tcp_server_legacy.c | |||
@@ -337,7 +337,6 @@ struct GNUNET_SERVER_Client | |||
337 | }; | 337 | }; |
338 | 338 | ||
339 | 339 | ||
340 | |||
341 | /** | 340 | /** |
342 | * Return user context associated with the given client. | 341 | * Return user context associated with the given client. |
343 | * Note: you should probably use the macro (call without the underscore). | 342 | * Note: you should probably use the macro (call without the underscore). |
diff --git a/src/transport/tcp_server_mst_legacy.c b/src/transport/tcp_server_mst_legacy.c index b27590a6f..cef41c5b0 100644 --- a/src/transport/tcp_server_mst_legacy.c +++ b/src/transport/tcp_server_mst_legacy.c | |||
@@ -72,7 +72,6 @@ struct GNUNET_SERVER_MessageStreamTokenizer | |||
72 | }; | 72 | }; |
73 | 73 | ||
74 | 74 | ||
75 | |||
76 | /** | 75 | /** |
77 | * Create a message stream tokenizer. | 76 | * Create a message stream tokenizer. |
78 | * | 77 | * |
@@ -305,5 +304,4 @@ GNUNET_SERVER_mst_destroy (struct GNUNET_SERVER_MessageStreamTokenizer *mst) | |||
305 | } | 304 | } |
306 | 305 | ||
307 | 306 | ||
308 | |||
309 | /* end of server_mst.c */ | 307 | /* end of server_mst.c */ |
diff --git a/src/transport/test_communicator_unix.c b/src/transport/test_communicator_unix.c index d1ab99910..db355c93e 100644 --- a/src/transport/test_communicator_unix.c +++ b/src/transport/test_communicator_unix.c | |||
@@ -193,6 +193,7 @@ run (void *cls) | |||
193 | NULL); /* cls */ | 193 | NULL); /* cls */ |
194 | } | 194 | } |
195 | 195 | ||
196 | |||
196 | int | 197 | int |
197 | main (int argc, | 198 | main (int argc, |
198 | char *const *argv) | 199 | char *const *argv) |
diff --git a/src/transport/test_http_common.c b/src/transport/test_http_common.c index d925f1318..6e31ec85e 100644 --- a/src/transport/test_http_common.c +++ b/src/transport/test_http_common.c | |||
@@ -262,4 +262,5 @@ main (int argc, char *argv[]) | |||
262 | return ret; | 262 | return ret; |
263 | } | 263 | } |
264 | 264 | ||
265 | |||
265 | /* end of test_http_common.c */ | 266 | /* end of test_http_common.c */ |
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c index ceb4333ac..10e07dae5 100644 --- a/src/transport/test_plugin_transport.c +++ b/src/transport/test_plugin_transport.c | |||
@@ -255,6 +255,7 @@ end_badly (void *cls) | |||
255 | ok = 1; | 255 | ok = 1; |
256 | } | 256 | } |
257 | 257 | ||
258 | |||
258 | static void | 259 | static void |
259 | wait_end (void *cls) | 260 | wait_end (void *cls) |
260 | { | 261 | { |
@@ -293,6 +294,7 @@ env_receive (void *cls, | |||
293 | return GNUNET_TIME_relative_get_zero_ (); | 294 | return GNUNET_TIME_relative_get_zero_ (); |
294 | } | 295 | } |
295 | 296 | ||
297 | |||
296 | static int got_reply; | 298 | static int got_reply; |
297 | 299 | ||
298 | 300 | ||
@@ -377,8 +379,7 @@ test_addr_string (void *cls) | |||
377 | int c1; | 379 | int c1; |
378 | for (c1 = 0; c1 < s2a_len; c1++ ) | 380 | for (c1 = 0; c1 < s2a_len; c1++ ) |
379 | fprintf (stderr, "%u == %u\n", ((char *) s2a)[c1], ((char *) w->addr)[c1]); | 381 | fprintf (stderr, "%u == %u\n", ((char *) s2a)[c1], ((char *) w->addr)[c1]); |
380 | */ | 382 | */if (s2a_len != w->address->address_length) |
381 | if (s2a_len != w->address->address_length) | ||
382 | { | 383 | { |
383 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 384 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
384 | "Plugin creates different address length when converting address->string->address: %u != %u\n", | 385 | "Plugin creates different address length when converting address->string->address: %u != %u\n", |
@@ -788,4 +789,5 @@ main (int argc, | |||
788 | return ret; | 789 | return ret; |
789 | } | 790 | } |
790 | 791 | ||
792 | |||
791 | /* end of test_plugin_transport.c */ | 793 | /* end of test_plugin_transport.c */ |
diff --git a/src/transport/test_transport_address_switch.c b/src/transport/test_transport_address_switch.c index b030aa1b8..b49cb187b 100644 --- a/src/transport/test_transport_address_switch.c +++ b/src/transport/test_transport_address_switch.c | |||
@@ -428,4 +428,6 @@ main (int argc, char *argv[]) | |||
428 | return 1; | 428 | return 1; |
429 | return 0; | 429 | return 0; |
430 | } | 430 | } |
431 | |||
432 | |||
431 | /* end of test_transport_address_switch.c */ | 433 | /* end of test_transport_address_switch.c */ |
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index 950eb2b04..5f5e03a9e 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c | |||
@@ -122,4 +122,5 @@ main (int argc, | |||
122 | return 0; | 122 | return 0; |
123 | } | 123 | } |
124 | 124 | ||
125 | |||
125 | /* end of test_transport_api.c */ | 126 | /* end of test_transport_api.c */ |
diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c index 76e0325af..c469f28bc 100644 --- a/src/transport/test_transport_api_disconnect.c +++ b/src/transport/test_transport_api_disconnect.c | |||
@@ -130,4 +130,5 @@ main (int argc, | |||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
132 | 132 | ||
133 | |||
133 | /* end of test_transport_api_disconnect.c */ | 134 | /* end of test_transport_api_disconnect.c */ |
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c index 089ad7a32..0e47800e8 100644 --- a/src/transport/test_transport_api_limited_sockets.c +++ b/src/transport/test_transport_api_limited_sockets.c | |||
@@ -113,6 +113,7 @@ main (int argc, char *argv[]) | |||
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
115 | 115 | ||
116 | |||
116 | #else | 117 | #else |
117 | /* cannot setrlimit */ | 118 | /* cannot setrlimit */ |
118 | 119 | ||
@@ -125,6 +126,7 @@ main (int argc, char *argv[]) | |||
125 | return 77; | 126 | return 77; |
126 | } | 127 | } |
127 | 128 | ||
129 | |||
128 | #endif | 130 | #endif |
129 | 131 | ||
130 | /* end of test_transport_api_limited_sockets.c */ | 132 | /* end of test_transport_api_limited_sockets.c */ |
diff --git a/src/transport/test_transport_api_manipulation_recv_tcp.c b/src/transport/test_transport_api_manipulation_recv_tcp.c index 5f651e3ed..207c4416f 100644 --- a/src/transport/test_transport_api_manipulation_recv_tcp.c +++ b/src/transport/test_transport_api_manipulation_recv_tcp.c | |||
@@ -199,4 +199,5 @@ main (int argc, | |||
199 | return 0; | 199 | return 0; |
200 | } | 200 | } |
201 | 201 | ||
202 | |||
202 | /* end of test_transport_api_manipulation_recv_tcp.c */ | 203 | /* end of test_transport_api_manipulation_recv_tcp.c */ |
diff --git a/src/transport/test_transport_api_manipulation_send_tcp.c b/src/transport/test_transport_api_manipulation_send_tcp.c index 28516bcae..ea735cfc6 100644 --- a/src/transport/test_transport_api_manipulation_send_tcp.c +++ b/src/transport/test_transport_api_manipulation_send_tcp.c | |||
@@ -195,4 +195,5 @@ main (int argc, | |||
195 | return 0; | 195 | return 0; |
196 | } | 196 | } |
197 | 197 | ||
198 | |||
198 | /* end of test_transport_api_manipulation_send_tcp.c */ | 199 | /* end of test_transport_api_manipulation_send_tcp.c */ |
diff --git a/src/transport/test_transport_api_monitor_peers.c b/src/transport/test_transport_api_monitor_peers.c index 4e12d0bad..c09e3782d 100644 --- a/src/transport/test_transport_api_monitor_peers.c +++ b/src/transport/test_transport_api_monitor_peers.c | |||
@@ -222,4 +222,5 @@ main (int argc, char *argv[]) | |||
222 | return 0; | 222 | return 0; |
223 | } | 223 | } |
224 | 224 | ||
225 | |||
225 | /* end of test_transport_api_monitor_peers.c */ | 226 | /* end of test_transport_api_monitor_peers.c */ |
diff --git a/src/transport/test_transport_api_restart_reconnect.c b/src/transport/test_transport_api_restart_reconnect.c index dff57a3a8..d58c1de54 100644 --- a/src/transport/test_transport_api_restart_reconnect.c +++ b/src/transport/test_transport_api_restart_reconnect.c | |||
@@ -213,4 +213,5 @@ main (int argc, | |||
213 | return 0; | 213 | return 0; |
214 | } | 214 | } |
215 | 215 | ||
216 | |||
216 | /* end of test_transport_api_restart_1peer.c */ | 217 | /* end of test_transport_api_restart_1peer.c */ |
diff --git a/src/transport/test_transport_api_timeout.c b/src/transport/test_transport_api_timeout.c index 80a457d15..9f8d3bb2b 100644 --- a/src/transport/test_transport_api_timeout.c +++ b/src/transport/test_transport_api_timeout.c | |||
@@ -160,4 +160,5 @@ main (int argc, | |||
160 | return 0; | 160 | return 0; |
161 | } | 161 | } |
162 | 162 | ||
163 | |||
163 | /* end of test_transport_api_timeout.c*/ | 164 | /* end of test_transport_api_timeout.c*/ |
diff --git a/src/transport/test_transport_blacklisting.c b/src/transport/test_transport_blacklisting.c index ef7f96d99..204935dcb 100644 --- a/src/transport/test_transport_blacklisting.c +++ b/src/transport/test_transport_blacklisting.c | |||
@@ -164,6 +164,7 @@ end_badly (void *cls) | |||
164 | ok = GNUNET_SYSERR; | 164 | ok = GNUNET_SYSERR; |
165 | } | 165 | } |
166 | 166 | ||
167 | |||
167 | static void | 168 | static void |
168 | testing_connect_cb (void *cls) | 169 | testing_connect_cb (void *cls) |
169 | { | 170 | { |
@@ -540,6 +541,7 @@ run_stage (void *cls) | |||
540 | GNUNET_SCHEDULER_add_now (&end, NULL); | 541 | GNUNET_SCHEDULER_add_now (&end, NULL); |
541 | } | 542 | } |
542 | 543 | ||
544 | |||
543 | static void | 545 | static void |
544 | run (void *cls, char *const *args, const char *cfgfile, | 546 | run (void *cls, char *const *args, const char *cfgfile, |
545 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 547 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
@@ -550,6 +552,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
550 | stage_task = GNUNET_SCHEDULER_add_now (&run_stage, NULL); | 552 | stage_task = GNUNET_SCHEDULER_add_now (&run_stage, NULL); |
551 | } | 553 | } |
552 | 554 | ||
555 | |||
553 | int | 556 | int |
554 | main (int argc, char *argv0[]) | 557 | main (int argc, char *argv0[]) |
555 | { | 558 | { |
@@ -575,4 +578,5 @@ main (int argc, char *argv0[]) | |||
575 | return ok; | 578 | return ok; |
576 | } | 579 | } |
577 | 580 | ||
581 | |||
578 | /* end of transport_api_blacklisting.c */ | 582 | /* end of transport_api_blacklisting.c */ |
diff --git a/src/transport/test_transport_testing_restart.c b/src/transport/test_transport_testing_restart.c index 108c8929e..f537af5fc 100644 --- a/src/transport/test_transport_testing_restart.c +++ b/src/transport/test_transport_testing_restart.c | |||
@@ -159,4 +159,5 @@ main (int argc, | |||
159 | return ret; | 159 | return ret; |
160 | } | 160 | } |
161 | 161 | ||
162 | |||
162 | /* end of test_transport_testing_restart.c */ | 163 | /* end of test_transport_testing_restart.c */ |
diff --git a/src/transport/test_transport_testing_startstop.c b/src/transport/test_transport_testing_startstop.c index 5b75a80e1..4783c1813 100644 --- a/src/transport/test_transport_testing_startstop.c +++ b/src/transport/test_transport_testing_startstop.c | |||
@@ -134,4 +134,5 @@ main (int argc, char *argv[]) | |||
134 | return ret; | 134 | return ret; |
135 | } | 135 | } |
136 | 136 | ||
137 | |||
137 | /* end of test_transport_testing_startstop.c */ | 138 | /* end of test_transport_testing_startstop.c */ |
diff --git a/src/transport/transport-testing-loggers.c b/src/transport/transport-testing-loggers.c index 0e539eac0..330a392c6 100644 --- a/src/transport/transport-testing-loggers.c +++ b/src/transport/transport-testing-loggers.c | |||
@@ -50,7 +50,6 @@ GNUNET_TRANSPORT_TESTING_log_connect (void *cls, | |||
50 | } | 50 | } |
51 | 51 | ||
52 | 52 | ||
53 | |||
54 | /** | 53 | /** |
55 | * Log a disconnect event. | 54 | * Log a disconnect event. |
56 | * | 55 | * |
@@ -77,4 +76,5 @@ GNUNET_TRANSPORT_TESTING_log_disconnect (void *cls, | |||
77 | GNUNET_free (ps); | 76 | GNUNET_free (ps); |
78 | } | 77 | } |
79 | 78 | ||
79 | |||
80 | /* end of transport-testing-loggers.c */ | 80 | /* end of transport-testing-loggers.c */ |
diff --git a/src/transport/transport-testing-main.c b/src/transport/transport-testing-main.c index 7581120c8..8c35ff252 100644 --- a/src/transport/transport-testing-main.c +++ b/src/transport/transport-testing-main.c | |||
@@ -609,4 +609,5 @@ GNUNET_TRANSPORT_TESTING_main_ (const char *argv0, | |||
609 | return ret; | 609 | return ret; |
610 | } | 610 | } |
611 | 611 | ||
612 | |||
612 | /* end of transport-testing-main.c */ | 613 | /* end of transport-testing-main.c */ |
diff --git a/src/transport/transport-testing-send.c b/src/transport/transport-testing-send.c index 5885ffb03..38018c172 100644 --- a/src/transport/transport-testing-send.c +++ b/src/transport/transport-testing-send.c | |||
@@ -236,4 +236,5 @@ GNUNET_TRANSPORT_TESTING_large_send (void *cls) | |||
236 | done ? sc->cont_cls : sc); | 236 | done ? sc->cont_cls : sc); |
237 | } | 237 | } |
238 | 238 | ||
239 | |||
239 | /* end of transport-testing-send.c */ | 240 | /* end of transport-testing-send.c */ |
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c index 225f7044f..06dbe891a 100644 --- a/src/transport/transport-testing.c +++ b/src/transport/transport-testing.c | |||
@@ -925,4 +925,5 @@ GNUNET_TRANSPORT_TESTING_init () | |||
925 | return tth; | 925 | return tth; |
926 | } | 926 | } |
927 | 927 | ||
928 | |||
928 | /* end of transport-testing.c */ | 929 | /* end of transport-testing.c */ |
diff --git a/src/transport/transport_api2_monitor.c b/src/transport/transport_api2_monitor.c index f358051b6..67aa1985e 100644 --- a/src/transport/transport_api2_monitor.c +++ b/src/transport/transport_api2_monitor.c | |||
@@ -288,4 +288,5 @@ GNUNET_TRANSPORT_monitor_cancel (struct GNUNET_TRANSPORT_MonitorContext *mc) | |||
288 | GNUNET_free (mc); | 288 | GNUNET_free (mc); |
289 | } | 289 | } |
290 | 290 | ||
291 | |||
291 | /* end of transport_api2_monitor.c */ | 292 | /* end of transport_api2_monitor.c */ |
diff --git a/src/transport/transport_api_blacklist.c b/src/transport/transport_api_blacklist.c index 45d9bcf29..b195a7fc7 100644 --- a/src/transport/transport_api_blacklist.c +++ b/src/transport/transport_api_blacklist.c | |||
@@ -92,6 +92,7 @@ handle_query (void *cls, | |||
92 | env); | 92 | env); |
93 | } | 93 | } |
94 | 94 | ||
95 | |||
95 | /** | 96 | /** |
96 | * Generic error handler, called with the appropriate error code and | 97 | * Generic error handler, called with the appropriate error code and |
97 | * the same closure specified at the creation of the message queue. | 98 | * the same closure specified at the creation of the message queue. |
diff --git a/src/transport/transport_api_monitor_peers.c b/src/transport/transport_api_monitor_peers.c index 956bf9e15..2f0f07f23 100644 --- a/src/transport/transport_api_monitor_peers.c +++ b/src/transport/transport_api_monitor_peers.c | |||
@@ -320,7 +320,6 @@ handle_response (void *cls, | |||
320 | } | 320 | } |
321 | 321 | ||
322 | 322 | ||
323 | |||
324 | /** | 323 | /** |
325 | * Generic error handler, called with the appropriate error code and | 324 | * Generic error handler, called with the appropriate error code and |
326 | * the same closure specified at the creation of the message queue. | 325 | * the same closure specified at the creation of the message queue. |
diff --git a/src/transport/transport_api_monitor_plugins.c b/src/transport/transport_api_monitor_plugins.c index 7910a57c2..d8eddddaa 100644 --- a/src/transport/transport_api_monitor_plugins.c +++ b/src/transport/transport_api_monitor_plugins.c | |||
@@ -93,7 +93,6 @@ struct GNUNET_TRANSPORT_PluginSession | |||
93 | }; | 93 | }; |
94 | 94 | ||
95 | 95 | ||
96 | |||
97 | /** | 96 | /** |
98 | * Task run to re-establish the connection. | 97 | * Task run to re-establish the connection. |
99 | * | 98 | * |