Author: grothoff Date: 2008-03-02 15:30:32 -0700 (Sun, 02 Mar 2008) New Revision: 6516
Modified: GNUnet/src/applications/chat/clientapi.c GNUnet/src/include/gnunet_util_network.h GNUnet/src/server/tcpserver.c GNUnet/src/transports/common.c GNUnet/src/transports/tcp.c GNUnet/src/transports/udp.c GNUnet/src/util/network/dns.c Log: formatting Modified: GNUnet/src/applications/chat/clientapi.c =================================================================== --- GNUnet/src/applications/chat/clientapi.c 2008-03-02 22:29:46 UTC (rev 6515) +++ GNUnet/src/applications/chat/clientapi.c 2008-03-02 22:30:32 UTC (rev 6516) @@ -33,7 +33,7 @@ /** * Listen for incoming messages on this chat room. When received, call the client callback. - * Also, support servers going away/coming back (i.e. rejoin chat room to keep server state up to date)... + * Also, support servers going away/coming back (i.e. rejoin chat room to keep server state up to date)... */ static void * poll_thread (void *rcls) Modified: GNUnet/src/include/gnunet_util_network.h =================================================================== --- GNUnet/src/include/gnunet_util_network.h 2008-03-02 22:29:46 UTC (rev 6515) +++ GNUnet/src/include/gnunet_util_network.h 2008-03-02 22:30:32 UTC (rev 6516) @@ -506,7 +506,7 @@ * @param *sa should be of type "struct sockaddr*" and * will be set to the IP address on success; * if *sa is NULL, sufficient space will be - * allocated. + * allocated. * @param socklen will be set to the length of *sa. * If *sa is not NULL, socklen will be checked * to see if sufficient space is provided and Modified: GNUnet/src/server/tcpserver.c =================================================================== --- GNUnet/src/server/tcpserver.c 2008-03-02 22:29:46 UTC (rev 6515) +++ GNUnet/src/server/tcpserver.c 2008-03-02 22:30:32 UTC (rev 6516) @@ -344,9 +344,10 @@ listenerPort = getGNUnetPort (); if (listenerPort == 0) return GNUNET_SYSERR; - if ( (GNUNET_YES == GNUNET_GC_get_configuration_value_yesno (cfg, "GNUNETD", "DISABLE-IPV6", - GNUNET_YES)) || - (-1 == (listenerFD = SOCKET (PF_INET6, SOCK_STREAM, 0))) ) + if ((GNUNET_YES == + GNUNET_GC_get_configuration_value_yesno (cfg, "GNUNETD", + "DISABLE-IPV6", GNUNET_YES)) + || (-1 == (listenerFD = SOCKET (PF_INET6, SOCK_STREAM, 0)))) { listenerFD = SOCKET (PF_INET, SOCK_STREAM, 0); if (listenerFD < 0) @@ -472,28 +473,29 @@ } GNUNET_free (ch); - if (GNUNET_YES != GNUNET_GC_get_configuration_value_yesno (cfg, "GNUNETD", "DISABLE-IPV6", - GNUNET_YES)) + if (GNUNET_YES != + GNUNET_GC_get_configuration_value_yesno (cfg, "GNUNETD", "DISABLE-IPV6", + GNUNET_YES)) { ch = NULL; if (-1 == GNUNET_GC_get_configuration_value_string (cfg, - "NETWORK", - "TRUSTED6", - "::1;", &ch)) - return GNUNET_SYSERR; + "NETWORK", + "TRUSTED6", + "::1;", &ch)) + return GNUNET_SYSERR; GNUNET_GE_ASSERT (ectx, ch != NULL); trustedNetworksV6 = GNUNET_parse_ipv6_network_specification (ectx, ch); if (trustedNetworksV6 == NULL) - { - GNUNET_GE_LOG (ectx, - GNUNET_GE_FATAL | GNUNET_GE_USER | GNUNET_GE_ADMIN | - GNUNET_GE_IMMEDIATE, - _ - ("Malformed network specification in the configuration in section `%s' for entry `%s': %s\n"), - "NETWORK", "TRUSTED6", ch); - GNUNET_free (ch); - return GNUNET_SYSERR; - } + { + GNUNET_GE_LOG (ectx, + GNUNET_GE_FATAL | GNUNET_GE_USER | GNUNET_GE_ADMIN | + GNUNET_GE_IMMEDIATE, + _ + ("Malformed network specification in the configuration in section `%s' for entry `%s': %s\n"), + "NETWORK", "TRUSTED6", ch); + GNUNET_free (ch); + return GNUNET_SYSERR; + } GNUNET_free (ch); } Modified: GNUnet/src/transports/common.c =================================================================== --- GNUnet/src/transports/common.c 2008-03-02 22:29:46 UTC (rev 6515) +++ GNUnet/src/transports/common.c 2008-03-02 22:30:32 UTC (rev 6516) @@ -175,7 +175,7 @@ * struct sockaddr_in6. addr_len will be used to * distinguish between the four cases and to pick * the right method. - * @return GNUNET_SYSERR if addr_len is not + * @return GNUNET_SYSERR if addr_len is not * a valid value or if there is any other * problem with the address; GNUNET_NO if * connections are allowed, GNUNET_YES if @@ -270,21 +270,24 @@ allowedNetworksIPv4 = NULL; GNUNET_free (ch); - if (GNUNET_YES != GNUNET_GC_get_configuration_value_yesno (cfg, "GNUNETD", "DISABLE-IPV6", - GNUNET_YES)) + if (GNUNET_YES != + GNUNET_GC_get_configuration_value_yesno (cfg, "GNUNETD", "DISABLE-IPV6", + GNUNET_YES)) { GNUNET_free_non_null (filteredNetworksIPv6); GNUNET_free_non_null (allowedNetworksIPv6); GNUNET_GC_get_configuration_value_string (cfg, MY_TRANSPORT_NAME, - "BLACKLISTV6", "", &ch); - filteredNetworksIPv6 = GNUNET_parse_ipv6_network_specification (ectx, ch); + "BLACKLISTV6", "", &ch); + filteredNetworksIPv6 = + GNUNET_parse_ipv6_network_specification (ectx, ch); GNUNET_free (ch); GNUNET_GC_get_configuration_value_string (cfg, MY_TRANSPORT_NAME, - "WHITELISTV6", "", &ch); + "WHITELISTV6", "", &ch); if (strlen (ch) > 0) - allowedNetworksIPv6 = GNUNET_parse_ipv6_network_specification (ectx, ch); + allowedNetworksIPv6 = + GNUNET_parse_ipv6_network_specification (ectx, ch); else - allowedNetworksIPv6 = NULL; + allowedNetworksIPv6 = NULL; GNUNET_free (ch); } GNUNET_mutex_unlock (lock); @@ -375,14 +378,14 @@ haddr = (HostAddress *) & msg[1]; available = available_protocols; - if ( (0 != (available & VERSION_AVAILABLE_IPV4)) && - (((upnp != NULL) && - (GNUNET_OK == upnp->get_ip (port, - MY_TRANSPORT_NAME, - &haddr->ipv4))) || - (GNUNET_SYSERR != - GNUNET_IP_get_public_ipv4_address (cfg, coreAPI->ectx, - &haddr->ipv4))) ) + if ((0 != (available & VERSION_AVAILABLE_IPV4)) && + (((upnp != NULL) && + (GNUNET_OK == upnp->get_ip (port, + MY_TRANSPORT_NAME, + &haddr->ipv4))) || + (GNUNET_SYSERR != + GNUNET_IP_get_public_ipv4_address (cfg, coreAPI->ectx, + &haddr->ipv4)))) { if (0 != memcmp (&haddr->ipv4, &last_addrv4, sizeof (struct in_addr))) { @@ -405,9 +408,9 @@ } - if ( (0 != (available & VERSION_AVAILABLE_IPV6)) && - (GNUNET_SYSERR != - GNUNET_IP_get_public_ipv6_address (cfg, coreAPI->ectx, &haddr->ipv6)) ) + if ((0 != (available & VERSION_AVAILABLE_IPV6)) && + (GNUNET_SYSERR != + GNUNET_IP_get_public_ipv6_address (cfg, coreAPI->ectx, &haddr->ipv6))) { if (0 != memcmp (&haddr->ipv6, &last_addrv6, sizeof (struct in6_addr))) { Modified: GNUnet/src/transports/tcp.c =================================================================== --- GNUnet/src/transports/tcp.c 2008-03-02 22:29:46 UTC (rev 6515) +++ GNUnet/src/transports/tcp.c 2008-03-02 22:30:32 UTC (rev 6516) @@ -657,10 +657,12 @@ if (port != 0) { available_protocols = VERSION_AVAILABLE_NONE; - if ( (GNUNET_YES == GNUNET_GC_get_configuration_value_yesno (cfg, "GNUNETD", "DISABLE-IPV6", - GNUNET_YES)) || - (0 > (s = SOCKET (PF_INET6, SOCK_STREAM, 0)) ) ) - { + if ((GNUNET_YES == + GNUNET_GC_get_configuration_value_yesno (cfg, "GNUNETD", + "DISABLE-IPV6", + GNUNET_YES)) + || (0 > (s = SOCKET (PF_INET6, SOCK_STREAM, 0)))) + { s = SOCKET (PF_INET, SOCK_STREAM, 0); if (s < 0) { Modified: GNUnet/src/transports/udp.c =================================================================== --- GNUnet/src/transports/udp.c 2008-03-02 22:29:46 UTC (rev 6515) +++ GNUnet/src/transports/udp.c 2008-03-02 22:30:32 UTC (rev 6516) @@ -273,8 +273,9 @@ available_protocols = VERSION_AVAILABLE_NONE; s = -1; - if (GNUNET_YES != GNUNET_GC_get_configuration_value_yesno (cfg, "GNUNETD", "DISABLE-IPV6", - GNUNET_YES)) + if (GNUNET_YES != + GNUNET_GC_get_configuration_value_yesno (cfg, "GNUNETD", "DISABLE-IPV6", + GNUNET_YES)) { #ifndef MINGW s = SOCKET (PF_INET6, SOCK_DGRAM, 17); Modified: GNUnet/src/util/network/dns.c =================================================================== --- GNUnet/src/util/network/dns.c 2008-03-02 22:29:46 UTC (rev 6515) +++ GNUnet/src/util/network/dns.c 2008-03-02 22:30:32 UTC (rev 6516) @@ -474,7 +474,7 @@ * @param *sa should be of type "struct sockaddr*" and * will be set to the IP address on success; * if *sa is NULL, sufficient space will be - * allocated. + * allocated. * @param socklen will be set to the length of *sa. * If *sa is not NULL, socklen will be checked * to see if sufficient space is provided and _______________________________________________ GNUnet-SVN mailing list GNUnet-SVN@gnu.org http://lists.gnu.org/mailman/listinfo/gnunet-svn