diff options
-rw-r--r-- | m4/argz.m4 | 4 | ||||
-rw-r--r-- | m4/libtool.m4 | 131 | ||||
-rw-r--r-- | m4/ltdl.m4 | 32 | ||||
-rw-r--r-- | m4/ltoptions.m4 | 2 | ||||
-rw-r--r-- | m4/ltsugar.m4 | 20 | ||||
-rw-r--r-- | m4/ltversion.m4 | 10 | ||||
-rw-r--r-- | src/core/core.h | 2 | ||||
-rw-r--r-- | src/core/gnunet-service-core.c | 7 | ||||
-rw-r--r-- | src/core/test_core_api.c | 2 | ||||
-rw-r--r-- | src/core/test_core_api_peer1.conf | 8 | ||||
-rw-r--r-- | src/core/test_core_api_peer2.conf | 8 | ||||
-rw-r--r-- | src/include/gnunet_common.h | 14 | ||||
-rw-r--r-- | src/resolver/test_resolver_api.c | 23 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport.c | 40 | ||||
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 55 | ||||
-rw-r--r-- | src/transport/transport.h | 2 | ||||
-rw-r--r-- | src/transport/transport_api.c | 9 | ||||
-rw-r--r-- | src/util/common_logging.c | 46 | ||||
-rw-r--r-- | src/util/network.c | 38 | ||||
-rw-r--r-- | src/util/service.c | 12 |
20 files changed, 271 insertions, 194 deletions
diff --git a/m4/argz.m4 b/m4/argz.m4 index edc99bbce..37c1b11e4 100644 --- a/m4/argz.m4 +++ b/m4/argz.m4 | |||
@@ -28,14 +28,14 @@ ARGZ_H= | |||
28 | AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \ | 28 | AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \ |
29 | argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])]) | 29 | argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])]) |
30 | 30 | ||
31 | dnl if have system argz functions, allow forced use of | 31 | dnl if have system argz functions, allow forced use of |
32 | dnl libltdl-supplied implementation (and default to do so | 32 | dnl libltdl-supplied implementation (and default to do so |
33 | dnl on "known bad" systems). Could use a runtime check, but | 33 | dnl on "known bad" systems). Could use a runtime check, but |
34 | dnl (a) detecting malloc issues is notoriously unreliable | 34 | dnl (a) detecting malloc issues is notoriously unreliable |
35 | dnl (b) only known system that declares argz functions, | 35 | dnl (b) only known system that declares argz functions, |
36 | dnl provides them, yet they are broken, is cygwin | 36 | dnl provides them, yet they are broken, is cygwin |
37 | dnl releases prior to 16-Mar-2007 (1.5.24 and earlier) | 37 | dnl releases prior to 16-Mar-2007 (1.5.24 and earlier) |
38 | dnl So, it's more straightforward simply to special case | 38 | dnl So, it's more straightforward simply to special case |
39 | dnl this for known bad systems. | 39 | dnl this for known bad systems. |
40 | AS_IF([test -z "$ARGZ_H"], | 40 | AS_IF([test -z "$ARGZ_H"], |
41 | [AC_CACHE_CHECK( | 41 | [AC_CACHE_CHECK( |
diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 6e86e5b43..1e7ea47c0 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 | |||
@@ -380,12 +380,12 @@ m4_define([lt_decl_dquote_varnames], | |||
380 | # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) | 380 | # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) |
381 | # --------------------------------------------------- | 381 | # --------------------------------------------------- |
382 | m4_define([lt_decl_varnames_tagged], | 382 | m4_define([lt_decl_varnames_tagged], |
383 | [_$0(m4_quote(m4_default([$1], [[, ]])), | 383 | [m4_assert([$# <= 2])dnl |
384 | m4_quote(m4_if([$2], [], | 384 | _$0(m4_quote(m4_default([$1], [[, ]])), |
385 | m4_quote(lt_decl_tag_varnames), | 385 | m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), |
386 | m4_quote(m4_shift($@)))), | 386 | m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) |
387 | m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) | 387 | m4_define([_lt_decl_varnames_tagged], |
388 | m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)]) | 388 | [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) |
389 | 389 | ||
390 | 390 | ||
391 | # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) | 391 | # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) |
@@ -945,10 +945,10 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ | |||
945 | _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; | 945 | _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; |
946 | darwin1.*) | 946 | darwin1.*) |
947 | _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | 947 | _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; |
948 | darwin*) # darwin 5.x on | 948 | darwin*) # darwin 5.x on |
949 | # if running on 10.5 or later, the deployment target defaults | 949 | # if running on 10.5 or later, the deployment target defaults |
950 | # to the OS version, if on x86, and 10.4, the deployment | 950 | # to the OS version, if on x86, and 10.4, the deployment |
951 | # target defaults to 10.4. Don't you love it? | 951 | # target defaults to 10.4. Don't you love it? |
952 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in | 952 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in |
953 | 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) | 953 | 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) |
954 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | 954 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; |
@@ -990,7 +990,11 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], | |||
990 | _LT_TAGVAR(whole_archive_flag_spec, $1)='' | 990 | _LT_TAGVAR(whole_archive_flag_spec, $1)='' |
991 | _LT_TAGVAR(link_all_deplibs, $1)=yes | 991 | _LT_TAGVAR(link_all_deplibs, $1)=yes |
992 | _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" | 992 | _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" |
993 | if test "$GCC" = "yes"; then | 993 | case $cc_basename in |
994 | ifort*) _lt_dar_can_shared=yes ;; | ||
995 | *) _lt_dar_can_shared=$GCC ;; | ||
996 | esac | ||
997 | if test "$_lt_dar_can_shared" = "yes"; then | ||
994 | output_verbose_link_cmd=echo | 998 | output_verbose_link_cmd=echo |
995 | _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" | 999 | _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" |
996 | _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" | 1000 | _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" |
@@ -1512,7 +1516,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl | |||
1512 | lt_cv_sys_max_cmd_len=-1; | 1516 | lt_cv_sys_max_cmd_len=-1; |
1513 | ;; | 1517 | ;; |
1514 | 1518 | ||
1515 | cygwin* | mingw*) | 1519 | cygwin* | mingw* | cegcc*) |
1516 | # On Win9x/ME, this test blows up -- it succeeds, but takes | 1520 | # On Win9x/ME, this test blows up -- it succeeds, but takes |
1517 | # about 5 minutes as the teststring grows exponentially. | 1521 | # about 5 minutes as the teststring grows exponentially. |
1518 | # Worse, since 9x/ME are not pre-emptively multitasking, | 1522 | # Worse, since 9x/ME are not pre-emptively multitasking, |
@@ -1680,10 +1684,6 @@ else | |||
1680 | # endif | 1684 | # endif |
1681 | #endif | 1685 | #endif |
1682 | 1686 | ||
1683 | #ifdef __cplusplus | ||
1684 | extern "C" void exit (int); | ||
1685 | #endif | ||
1686 | |||
1687 | void fnord() { int i=42;} | 1687 | void fnord() { int i=42;} |
1688 | int main () | 1688 | int main () |
1689 | { | 1689 | { |
@@ -1699,7 +1699,7 @@ int main () | |||
1699 | else | 1699 | else |
1700 | puts (dlerror ()); | 1700 | puts (dlerror ()); |
1701 | 1701 | ||
1702 | exit (status); | 1702 | return status; |
1703 | }] | 1703 | }] |
1704 | _LT_EOF | 1704 | _LT_EOF |
1705 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then | 1705 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then |
@@ -1738,7 +1738,7 @@ else | |||
1738 | lt_cv_dlopen_self=yes | 1738 | lt_cv_dlopen_self=yes |
1739 | ;; | 1739 | ;; |
1740 | 1740 | ||
1741 | mingw* | pw32*) | 1741 | mingw* | pw32* | cegcc*) |
1742 | lt_cv_dlopen="LoadLibrary" | 1742 | lt_cv_dlopen="LoadLibrary" |
1743 | lt_cv_dlopen_libs= | 1743 | lt_cv_dlopen_libs= |
1744 | ;; | 1744 | ;; |
@@ -2035,6 +2035,7 @@ m4_defun([_LT_SYS_DYNAMIC_LINKER], | |||
2035 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | 2035 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
2036 | m4_require([_LT_DECL_EGREP])dnl | 2036 | m4_require([_LT_DECL_EGREP])dnl |
2037 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | 2037 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
2038 | m4_require([_LT_DECL_OBJDUMP])dnl | ||
2038 | m4_require([_LT_DECL_SED])dnl | 2039 | m4_require([_LT_DECL_SED])dnl |
2039 | AC_MSG_CHECKING([dynamic linker characteristics]) | 2040 | AC_MSG_CHECKING([dynamic linker characteristics]) |
2040 | m4_if([$1], | 2041 | m4_if([$1], |
@@ -2199,14 +2200,14 @@ bsdi[[45]]*) | |||
2199 | # libtool to hard-code these into programs | 2200 | # libtool to hard-code these into programs |
2200 | ;; | 2201 | ;; |
2201 | 2202 | ||
2202 | cygwin* | mingw* | pw32*) | 2203 | cygwin* | mingw* | pw32* | cegcc*) |
2203 | version_type=windows | 2204 | version_type=windows |
2204 | shrext_cmds=".dll" | 2205 | shrext_cmds=".dll" |
2205 | need_version=no | 2206 | need_version=no |
2206 | need_lib_prefix=no | 2207 | need_lib_prefix=no |
2207 | 2208 | ||
2208 | case $GCC,$host_os in | 2209 | case $GCC,$host_os in |
2209 | yes,cygwin* | yes,mingw* | yes,pw32*) | 2210 | yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) |
2210 | library_names_spec='$libname.dll.a' | 2211 | library_names_spec='$libname.dll.a' |
2211 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | 2212 | # DLL is installed to $(libdir)/../bin by postinstall_cmds |
2212 | postinstall_cmds='base_file=`basename \${file}`~ | 2213 | postinstall_cmds='base_file=`basename \${file}`~ |
@@ -2229,7 +2230,7 @@ cygwin* | mingw* | pw32*) | |||
2229 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | 2230 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' |
2230 | sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" | 2231 | sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" |
2231 | ;; | 2232 | ;; |
2232 | mingw*) | 2233 | mingw* | cegcc*) |
2233 | # MinGW DLLs use traditional 'lib' prefix | 2234 | # MinGW DLLs use traditional 'lib' prefix |
2234 | soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | 2235 | soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' |
2235 | sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | 2236 | sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` |
@@ -2667,7 +2668,7 @@ tpf*) | |||
2667 | version_type=linux | 2668 | version_type=linux |
2668 | need_lib_prefix=no | 2669 | need_lib_prefix=no |
2669 | need_version=no | 2670 | need_version=no |
2670 | library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | 2671 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2671 | shlibpath_var=LD_LIBRARY_PATH | 2672 | shlibpath_var=LD_LIBRARY_PATH |
2672 | shlibpath_overrides_runpath=no | 2673 | shlibpath_overrides_runpath=no |
2673 | hardcode_into_libs=yes | 2674 | hardcode_into_libs=yes |
@@ -2691,7 +2692,7 @@ variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | |||
2691 | if test "$GCC" = yes; then | 2692 | if test "$GCC" = yes; then |
2692 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | 2693 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
2693 | fi | 2694 | fi |
2694 | 2695 | ||
2695 | if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then | 2696 | if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then |
2696 | sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" | 2697 | sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" |
2697 | fi | 2698 | fi |
@@ -2968,6 +2969,7 @@ _LT_DECL([], [reload_cmds], [2])dnl | |||
2968 | # -- PORTME fill in with the dynamic library characteristics | 2969 | # -- PORTME fill in with the dynamic library characteristics |
2969 | m4_defun([_LT_CHECK_MAGIC_METHOD], | 2970 | m4_defun([_LT_CHECK_MAGIC_METHOD], |
2970 | [m4_require([_LT_DECL_EGREP]) | 2971 | [m4_require([_LT_DECL_EGREP]) |
2972 | m4_require([_LT_DECL_OBJDUMP]) | ||
2971 | AC_CACHE_CHECK([how to recognize dependent libraries], | 2973 | AC_CACHE_CHECK([how to recognize dependent libraries], |
2972 | lt_cv_deplibs_check_method, | 2974 | lt_cv_deplibs_check_method, |
2973 | [lt_cv_file_magic_cmd='$MAGIC_CMD' | 2975 | [lt_cv_file_magic_cmd='$MAGIC_CMD' |
@@ -3018,6 +3020,12 @@ mingw* | pw32*) | |||
3018 | fi | 3020 | fi |
3019 | ;; | 3021 | ;; |
3020 | 3022 | ||
3023 | cegcc) | ||
3024 | # use the weaker test based on 'objdump'. See mingw*. | ||
3025 | lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' | ||
3026 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
3027 | ;; | ||
3028 | |||
3021 | darwin* | rhapsody*) | 3029 | darwin* | rhapsody*) |
3022 | lt_cv_deplibs_check_method=pass_all | 3030 | lt_cv_deplibs_check_method=pass_all |
3023 | ;; | 3031 | ;; |
@@ -3329,7 +3337,7 @@ case $host_os in | |||
3329 | aix*) | 3337 | aix*) |
3330 | symcode='[[BCDT]]' | 3338 | symcode='[[BCDT]]' |
3331 | ;; | 3339 | ;; |
3332 | cygwin* | mingw* | pw32*) | 3340 | cygwin* | mingw* | pw32* | cegcc*) |
3333 | symcode='[[ABCDGISTW]]' | 3341 | symcode='[[ABCDGISTW]]' |
3334 | ;; | 3342 | ;; |
3335 | hpux*) | 3343 | hpux*) |
@@ -3575,7 +3583,7 @@ m4_if([$1], [CXX], [ | |||
3575 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | 3583 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
3576 | # PIC is the default for these OSes. | 3584 | # PIC is the default for these OSes. |
3577 | ;; | 3585 | ;; |
3578 | mingw* | cygwin* | os2* | pw32*) | 3586 | mingw* | cygwin* | os2* | pw32* | cegcc*) |
3579 | # This hack is so that the source file can tell whether it is being | 3587 | # This hack is so that the source file can tell whether it is being |
3580 | # built for inclusion in a dll (and should export symbols for example). | 3588 | # built for inclusion in a dll (and should export symbols for example). |
3581 | # Although the cygwin gcc ignores -fPIC, still need this for old-style | 3589 | # Although the cygwin gcc ignores -fPIC, still need this for old-style |
@@ -3602,10 +3610,11 @@ m4_if([$1], [CXX], [ | |||
3602 | fi | 3610 | fi |
3603 | ;; | 3611 | ;; |
3604 | hpux*) | 3612 | hpux*) |
3605 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | 3613 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit |
3606 | # not for PA HP-UX. | 3614 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag |
3615 | # sets the default TLS model and affects inlining. | ||
3607 | case $host_cpu in | 3616 | case $host_cpu in |
3608 | hppa*64*|ia64*) | 3617 | hppa*64*) |
3609 | ;; | 3618 | ;; |
3610 | *) | 3619 | *) |
3611 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | 3620 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
@@ -3703,12 +3712,19 @@ m4_if([$1], [CXX], [ | |||
3703 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | 3712 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
3704 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | 3713 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
3705 | ;; | 3714 | ;; |
3706 | icpc* | ecpc* ) | 3715 | ecpc* ) |
3707 | # Intel C++ | 3716 | # old Intel C++ for x86_64 which still supported -KPIC. |
3708 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | 3717 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
3709 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | 3718 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
3710 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | 3719 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
3711 | ;; | 3720 | ;; |
3721 | icpc* ) | ||
3722 | # Intel C++, used to be incompatible with GCC. | ||
3723 | # ICC 10 doesn't accept -KPIC any more. | ||
3724 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
3725 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
3726 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
3727 | ;; | ||
3712 | pgCC* | pgcpp*) | 3728 | pgCC* | pgcpp*) |
3713 | # Portland Group C++ compiler | 3729 | # Portland Group C++ compiler |
3714 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | 3730 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
@@ -3874,7 +3890,7 @@ m4_if([$1], [CXX], [ | |||
3874 | # PIC is the default for these OSes. | 3890 | # PIC is the default for these OSes. |
3875 | ;; | 3891 | ;; |
3876 | 3892 | ||
3877 | mingw* | cygwin* | pw32* | os2*) | 3893 | mingw* | cygwin* | pw32* | os2* | cegcc*) |
3878 | # This hack is so that the source file can tell whether it is being | 3894 | # This hack is so that the source file can tell whether it is being |
3879 | # built for inclusion in a dll (and should export symbols for example). | 3895 | # built for inclusion in a dll (and should export symbols for example). |
3880 | # Although the cygwin gcc ignores -fPIC, still need this for old-style | 3896 | # Although the cygwin gcc ignores -fPIC, still need this for old-style |
@@ -3890,10 +3906,11 @@ m4_if([$1], [CXX], [ | |||
3890 | ;; | 3906 | ;; |
3891 | 3907 | ||
3892 | hpux*) | 3908 | hpux*) |
3893 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | 3909 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit |
3894 | # not for PA HP-UX. | 3910 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag |
3911 | # sets the default TLS model and affects inlining. | ||
3895 | case $host_cpu in | 3912 | case $host_cpu in |
3896 | hppa*64*|ia64*) | 3913 | hppa*64*) |
3897 | # +Z the default | 3914 | # +Z the default |
3898 | ;; | 3915 | ;; |
3899 | *) | 3916 | *) |
@@ -3943,7 +3960,7 @@ m4_if([$1], [CXX], [ | |||
3943 | fi | 3960 | fi |
3944 | ;; | 3961 | ;; |
3945 | 3962 | ||
3946 | mingw* | cygwin* | pw32* | os2*) | 3963 | mingw* | cygwin* | pw32* | os2* | cegcc*) |
3947 | # This hack is so that the source file can tell whether it is being | 3964 | # This hack is so that the source file can tell whether it is being |
3948 | # built for inclusion in a dll (and should export symbols for example). | 3965 | # built for inclusion in a dll (and should export symbols for example). |
3949 | m4_if([$1], [GCJ], [], | 3966 | m4_if([$1], [GCJ], [], |
@@ -3974,11 +3991,25 @@ m4_if([$1], [CXX], [ | |||
3974 | 3991 | ||
3975 | linux* | k*bsd*-gnu) | 3992 | linux* | k*bsd*-gnu) |
3976 | case $cc_basename in | 3993 | case $cc_basename in |
3977 | icc* | ecc* | ifort*) | 3994 | # old Intel for x86_64 which still supported -KPIC. |
3995 | ecc*) | ||
3978 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | 3996 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
3979 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | 3997 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
3980 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | 3998 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
3981 | ;; | 3999 | ;; |
4000 | # icc used to be incompatible with GCC. | ||
4001 | # ICC 10 doesn't accept -KPIC any more. | ||
4002 | icc* | ifort*) | ||
4003 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4004 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4005 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4006 | ;; | ||
4007 | # Lahey Fortran 8.1. | ||
4008 | lf95*) | ||
4009 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4010 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' | ||
4011 | _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' | ||
4012 | ;; | ||
3982 | pgcc* | pgf77* | pgf90* | pgf95*) | 4013 | pgcc* | pgf77* | pgf90* | pgf95*) |
3983 | # Portland Group compilers (*not* the Pentium gcc compiler, | 4014 | # Portland Group compilers (*not* the Pentium gcc compiler, |
3984 | # which looks to be a dead project) | 4015 | # which looks to be a dead project) |
@@ -4160,7 +4191,7 @@ m4_if([$1], [CXX], [ | |||
4160 | pw32*) | 4191 | pw32*) |
4161 | _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" | 4192 | _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" |
4162 | ;; | 4193 | ;; |
4163 | cygwin* | mingw*) | 4194 | cygwin* | mingw* | cegcc*) |
4164 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' | 4195 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' |
4165 | ;; | 4196 | ;; |
4166 | linux* | k*bsd*-gnu) | 4197 | linux* | k*bsd*-gnu) |
@@ -4215,7 +4246,7 @@ dnl Note also adjust exclude_expsyms for C++ above. | |||
4215 | extract_expsyms_cmds= | 4246 | extract_expsyms_cmds= |
4216 | 4247 | ||
4217 | case $host_os in | 4248 | case $host_os in |
4218 | cygwin* | mingw* | pw32*) | 4249 | cygwin* | mingw* | pw32* | cegcc*) |
4219 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | 4250 | # FIXME: the MSVC++ port hasn't been tested in a loooong time |
4220 | # When not using gcc, we currently assume that we are using | 4251 | # When not using gcc, we currently assume that we are using |
4221 | # Microsoft Visual C++. | 4252 | # Microsoft Visual C++. |
@@ -4230,6 +4261,9 @@ dnl Note also adjust exclude_expsyms for C++ above. | |||
4230 | openbsd*) | 4261 | openbsd*) |
4231 | with_gnu_ld=no | 4262 | with_gnu_ld=no |
4232 | ;; | 4263 | ;; |
4264 | linux* | k*bsd*-gnu) | ||
4265 | _LT_TAGVAR(link_all_deplibs, $1)=no | ||
4266 | ;; | ||
4233 | esac | 4267 | esac |
4234 | 4268 | ||
4235 | _LT_TAGVAR(ld_shlibs, $1)=yes | 4269 | _LT_TAGVAR(ld_shlibs, $1)=yes |
@@ -4302,7 +4336,7 @@ _LT_EOF | |||
4302 | fi | 4336 | fi |
4303 | ;; | 4337 | ;; |
4304 | 4338 | ||
4305 | cygwin* | mingw* | pw32*) | 4339 | cygwin* | mingw* | pw32* | cegcc*) |
4306 | # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | 4340 | # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, |
4307 | # as there is no search path for DLLs. | 4341 | # as there is no search path for DLLs. |
4308 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | 4342 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
@@ -4368,6 +4402,9 @@ _LT_EOF | |||
4368 | tmp_addflag=' -i_dynamic -nofor_main' ;; | 4402 | tmp_addflag=' -i_dynamic -nofor_main' ;; |
4369 | ifc* | ifort*) # Intel Fortran compiler | 4403 | ifc* | ifort*) # Intel Fortran compiler |
4370 | tmp_addflag=' -nofor_main' ;; | 4404 | tmp_addflag=' -nofor_main' ;; |
4405 | lf95*) # Lahey Fortran 8.1 | ||
4406 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
4407 | tmp_sharedflag='--shared' ;; | ||
4371 | xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) | 4408 | xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) |
4372 | tmp_sharedflag='-qmkshrobj' | 4409 | tmp_sharedflag='-qmkshrobj' |
4373 | tmp_addflag= ;; | 4410 | tmp_addflag= ;; |
@@ -4600,6 +4637,7 @@ _LT_EOF | |||
4600 | fi | 4637 | fi |
4601 | fi | 4638 | fi |
4602 | 4639 | ||
4640 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' | ||
4603 | # It seems that -bexpall does not export symbols beginning with | 4641 | # It seems that -bexpall does not export symbols beginning with |
4604 | # underscore (_), so it is better to generate a list of symbols to export. | 4642 | # underscore (_), so it is better to generate a list of symbols to export. |
4605 | _LT_TAGVAR(always_export_symbols, $1)=yes | 4643 | _LT_TAGVAR(always_export_symbols, $1)=yes |
@@ -4654,7 +4692,7 @@ _LT_EOF | |||
4654 | _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic | 4692 | _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic |
4655 | ;; | 4693 | ;; |
4656 | 4694 | ||
4657 | cygwin* | mingw* | pw32*) | 4695 | cygwin* | mingw* | pw32* | cegcc*) |
4658 | # When not using gcc, we currently assume that we are using | 4696 | # When not using gcc, we currently assume that we are using |
4659 | # Microsoft Visual C++. | 4697 | # Microsoft Visual C++. |
4660 | # hardcode_libdir_flag_spec is actually meaningless, as there is | 4698 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
@@ -4758,7 +4796,7 @@ _LT_EOF | |||
4758 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | 4796 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
4759 | ;; | 4797 | ;; |
4760 | ia64*) | 4798 | ia64*) |
4761 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | 4799 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' |
4762 | ;; | 4800 | ;; |
4763 | *) | 4801 | *) |
4764 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | 4802 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' |
@@ -5543,6 +5581,7 @@ if test "$_lt_caught_CXX_error" != yes; then | |||
5543 | fi | 5581 | fi |
5544 | fi | 5582 | fi |
5545 | 5583 | ||
5584 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' | ||
5546 | # It seems that -bexpall does not export symbols beginning with | 5585 | # It seems that -bexpall does not export symbols beginning with |
5547 | # underscore (_), so it is better to generate a list of symbols to | 5586 | # underscore (_), so it is better to generate a list of symbols to |
5548 | # export. | 5587 | # export. |
@@ -5601,7 +5640,7 @@ if test "$_lt_caught_CXX_error" != yes; then | |||
5601 | esac | 5640 | esac |
5602 | ;; | 5641 | ;; |
5603 | 5642 | ||
5604 | cygwin* | mingw* | pw32*) | 5643 | cygwin* | mingw* | pw32* | cegcc*) |
5605 | # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | 5644 | # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, |
5606 | # as there is no search path for DLLs. | 5645 | # as there is no search path for DLLs. |
5607 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | 5646 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
@@ -6986,6 +7025,18 @@ AC_SUBST([GREP]) | |||
6986 | ]) | 7025 | ]) |
6987 | 7026 | ||
6988 | 7027 | ||
7028 | # _LT_DECL_OBJDUMP | ||
7029 | # -------------- | ||
7030 | # If we don't have a new enough Autoconf to choose the best objdump | ||
7031 | # available, choose the one first in the user's PATH. | ||
7032 | m4_defun([_LT_DECL_OBJDUMP], | ||
7033 | [AC_CHECK_TOOL(OBJDUMP, objdump, false) | ||
7034 | test -z "$OBJDUMP" && OBJDUMP=objdump | ||
7035 | _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) | ||
7036 | AC_SUBST([OBJDUMP]) | ||
7037 | ]) | ||
7038 | |||
7039 | |||
6989 | # _LT_DECL_SED | 7040 | # _LT_DECL_SED |
6990 | # ------------ | 7041 | # ------------ |
6991 | # Check for a fully-functional sed program, that truncates | 7042 | # Check for a fully-functional sed program, that truncates |
diff --git a/m4/ltdl.m4 b/m4/ltdl.m4 index eb8db0cd1..46535e2e1 100644 --- a/m4/ltdl.m4 +++ b/m4/ltdl.m4 | |||
@@ -7,7 +7,7 @@ | |||
7 | # unlimited permission to copy and/or distribute it, with or without | 7 | # unlimited permission to copy and/or distribute it, with or without |
8 | # modifications, as long as this notice is preserved. | 8 | # modifications, as long as this notice is preserved. |
9 | 9 | ||
10 | # serial 15 LTDL_INIT | 10 | # serial 17 LTDL_INIT |
11 | 11 | ||
12 | # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) | 12 | # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) |
13 | # ------------------------------------------ | 13 | # ------------------------------------------ |
@@ -212,26 +212,10 @@ m4_define([$0], []) | |||
212 | # of into LIBOBJS. | 212 | # of into LIBOBJS. |
213 | AC_DEFUN([_LT_LIBOBJ], [ | 213 | AC_DEFUN([_LT_LIBOBJ], [ |
214 | m4_pattern_allow([^_LT_LIBOBJS$]) | 214 | m4_pattern_allow([^_LT_LIBOBJS$]) |
215 | AS_LITERAL_IF([$1], [_LT_LIBSOURCES([$1.c])])dnl | ||
216 | _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" | 215 | _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" |
217 | ])# _LT_LIBOBJS | 216 | ])# _LT_LIBOBJS |
218 | 217 | ||
219 | 218 | ||
220 | # _LT_LIBSOURCES(MODULE_NAMES) | ||
221 | # ---------------------------- | ||
222 | # Like AC_LIBSOURCES, except the directory where the libltdl source files | ||
223 | # are expected is distinct from the user LIBOBJ directory. | ||
224 | AC_DEFUN([_LT_LIBSOURCES], [ | ||
225 | m4_foreach([_LTNAME], [$1], [ | ||
226 | m4_syscmd([test -r "$lt_libobj_prefix]_LTNAME[" || | ||
227 | test -z "$lt_libobj_prefix" || | ||
228 | test ! -d "$lt_libobj_prefix"])dnl | ||
229 | m4_if(m4_sysval, [0], [], | ||
230 | [AC_FATAL([missing $lt_libobj_prefix/]_LTNAME)]) | ||
231 | ]) | ||
232 | ])# _LT_LIBSOURCES | ||
233 | |||
234 | |||
235 | # LTDL_INIT([OPTIONS]) | 219 | # LTDL_INIT([OPTIONS]) |
236 | # -------------------- | 220 | # -------------------- |
237 | # Clients of libltdl can use this macro to allow the installer to | 221 | # Clients of libltdl can use this macro to allow the installer to |
@@ -245,9 +229,9 @@ _LT_SET_OPTIONS([$0], [$1]) | |||
245 | 229 | ||
246 | dnl We need to keep our own list of libobjs separate from our parent project, | 230 | dnl We need to keep our own list of libobjs separate from our parent project, |
247 | dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while | 231 | dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while |
248 | dnl we look for our own LIBOBJs. Definitions in ltdl-libobj.m4. | 232 | dnl we look for our own LIBOBJs. |
249 | m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) | 233 | m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) |
250 | m4_pushdef([AC_LIBSOURCES], m4_defn([_LT_LIBSOURCES])) | 234 | m4_pushdef([AC_LIBSOURCES]) |
251 | 235 | ||
252 | dnl If not otherwise defined, default to the 1.5.x compatible subproject mode: | 236 | dnl If not otherwise defined, default to the 1.5.x compatible subproject mode: |
253 | m4_if(_LTDL_MODE, [], | 237 | m4_if(_LTDL_MODE, [], |
@@ -264,7 +248,7 @@ if test "x$with_included_ltdl" != xyes; then | |||
264 | # decide whether there is a useful installed version we can use. | 248 | # decide whether there is a useful installed version we can use. |
265 | AC_CHECK_HEADER([ltdl.h], | 249 | AC_CHECK_HEADER([ltdl.h], |
266 | [AC_CHECK_DECL([lt_dlinterface_register], | 250 | [AC_CHECK_DECL([lt_dlinterface_register], |
267 | [AC_CHECK_LIB([ltdl], [lt_dlinterface_register], | 251 | [AC_CHECK_LIB([ltdl], [lt_dladvise_preload], |
268 | [with_included_ltdl=no], | 252 | [with_included_ltdl=no], |
269 | [with_included_ltdl=yes])], | 253 | [with_included_ltdl=yes])], |
270 | [with_included_ltdl=yes], | 254 | [with_included_ltdl=yes], |
@@ -396,12 +380,6 @@ m4_require([_LT_HEADER_DLFCN])dnl | |||
396 | m4_require([_LT_CHECK_DLPREOPEN])dnl | 380 | m4_require([_LT_CHECK_DLPREOPEN])dnl |
397 | m4_require([_LT_DECL_SED])dnl | 381 | m4_require([_LT_DECL_SED])dnl |
398 | 382 | ||
399 | # lt_cv_dlopen_self gets defined by LT_SYS_DLOPEN_SELF, called by LT_INIT | ||
400 | if test "$lt_cv_dlopen_self" = yes; then | ||
401 | AC_DEFINE([LTDL_DLOPEN_SELF_WORKS], [1], | ||
402 | [Define if dlopen(NULL) is able to resolve symbols from the main program.]) | ||
403 | fi | ||
404 | |||
405 | dnl Don't require this, or it will be expanded earlier than the code | 383 | dnl Don't require this, or it will be expanded earlier than the code |
406 | dnl that sets the variables it relies on: | 384 | dnl that sets the variables it relies on: |
407 | _LT_ENABLE_INSTALL | 385 | _LT_ENABLE_INSTALL |
@@ -429,6 +407,8 @@ AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h], | |||
429 | AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) | 407 | AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) |
430 | AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) | 408 | AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) |
431 | 409 | ||
410 | AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) | ||
411 | |||
432 | name=ltdl | 412 | name=ltdl |
433 | LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` | 413 | LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` |
434 | AC_SUBST([LTDLOPEN]) | 414 | AC_SUBST([LTDLOPEN]) |
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 index e97011948..34151a3ba 100644 --- a/m4/ltoptions.m4 +++ b/m4/ltoptions.m4 | |||
@@ -125,7 +125,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll], | |||
125 | [enable_win32_dll=yes | 125 | [enable_win32_dll=yes |
126 | 126 | ||
127 | case $host in | 127 | case $host in |
128 | *-*-cygwin* | *-*-mingw* | *-*-pw32*) | 128 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) |
129 | AC_CHECK_TOOL(AS, as, false) | 129 | AC_CHECK_TOOL(AS, as, false) |
130 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) | 130 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
131 | AC_CHECK_TOOL(OBJDUMP, objdump, false) | 131 | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 index 0d258e070..9000a057d 100644 --- a/m4/ltsugar.m4 +++ b/m4/ltsugar.m4 | |||
@@ -1,13 +1,13 @@ | |||
1 | # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- | 1 | # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- |
2 | # | 2 | # |
3 | # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. | 3 | # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. |
4 | # Written by Gary V. Vaughan, 2004 | 4 | # Written by Gary V. Vaughan, 2004 |
5 | # | 5 | # |
6 | # This file is free software; the Free Software Foundation gives | 6 | # This file is free software; the Free Software Foundation gives |
7 | # unlimited permission to copy and/or distribute it, with or without | 7 | # unlimited permission to copy and/or distribute it, with or without |
8 | # modifications, as long as this notice is preserved. | 8 | # modifications, as long as this notice is preserved. |
9 | 9 | ||
10 | # serial 5 ltsugar.m4 | 10 | # serial 6 ltsugar.m4 |
11 | 11 | ||
12 | # This is to help aclocal find these macros, as it can't see m4_define. | 12 | # This is to help aclocal find these macros, as it can't see m4_define. |
13 | AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) | 13 | AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) |
@@ -63,14 +63,14 @@ m4_define([lt_append], | |||
63 | # Produce a SEP delimited list of all paired combinations of elements of | 63 | # Produce a SEP delimited list of all paired combinations of elements of |
64 | # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list | 64 | # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list |
65 | # has the form PREFIXmINFIXSUFFIXn. | 65 | # has the form PREFIXmINFIXSUFFIXn. |
66 | # Needed until we can rely on m4_combine added in Autoconf 2.62. | ||
66 | m4_define([lt_combine], | 67 | m4_define([lt_combine], |
67 | [m4_if([$2], [], [], | 68 | [m4_if(m4_eval([$# > 3]), [1], |
68 | [m4_if([$4], [], [], | 69 | [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl |
69 | [lt_join(m4_quote(m4_default([$1], [[, ]])), | 70 | [[m4_foreach([_Lt_prefix], [$2], |
70 | lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2], | 71 | [m4_foreach([_Lt_suffix], |
71 | [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]), | 72 | ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, |
72 | [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl | 73 | [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) |
73 | ]) | ||
74 | 74 | ||
75 | 75 | ||
76 | # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) | 76 | # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) |
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 index 45cb1557c..b8e154fe6 100644 --- a/m4/ltversion.m4 +++ b/m4/ltversion.m4 | |||
@@ -9,15 +9,15 @@ | |||
9 | 9 | ||
10 | # Generated from ltversion.in. | 10 | # Generated from ltversion.in. |
11 | 11 | ||
12 | # serial 2976 ltversion.m4 | 12 | # serial 3012 ltversion.m4 |
13 | # This file is part of GNU Libtool | 13 | # This file is part of GNU Libtool |
14 | 14 | ||
15 | m4_define([LT_PACKAGE_VERSION], [2.2.4]) | 15 | m4_define([LT_PACKAGE_VERSION], [2.2.6]) |
16 | m4_define([LT_PACKAGE_REVISION], [1.2976]) | 16 | m4_define([LT_PACKAGE_REVISION], [1.3012]) |
17 | 17 | ||
18 | AC_DEFUN([LTVERSION_VERSION], | 18 | AC_DEFUN([LTVERSION_VERSION], |
19 | [macro_version='2.2.4' | 19 | [macro_version='2.2.6' |
20 | macro_revision='1.2976' | 20 | macro_revision='1.3012' |
21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) | 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) |
22 | _LT_DECL(, macro_revision, 0) | 22 | _LT_DECL(, macro_revision, 0) |
23 | ]) | 23 | ]) |
diff --git a/src/core/core.h b/src/core/core.h index 840c7e143..9f520bf40 100644 --- a/src/core/core.h +++ b/src/core/core.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "gnunet_crypto_lib.h" | 26 | #include "gnunet_crypto_lib.h" |
27 | #include "gnunet_time_lib.h" | 27 | #include "gnunet_time_lib.h" |
28 | 28 | ||
29 | #define DEBUG_CORE GNUNET_NO | 29 | #define DEBUG_CORE GNUNET_YES |
30 | 30 | ||
31 | /** | 31 | /** |
32 | * Definition of bits in the InitMessage's options field that specify | 32 | * Definition of bits in the InitMessage's options field that specify |
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 2fbb4ca05..44df8a867 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c | |||
@@ -1606,6 +1606,8 @@ send_connect_continuation (void *cls, size_t size, void *buf) | |||
1606 | "Asked to send message to disconnected peer `%4s' and connection failed. Discarding message.\n", | 1606 | "Asked to send message to disconnected peer `%4s' and connection failed. Discarding message.\n", |
1607 | GNUNET_i2s (&sm->peer)); | 1607 | GNUNET_i2s (&sm->peer)); |
1608 | GNUNET_free (sm); | 1608 | GNUNET_free (sm); |
1609 | /* FIXME: do we need to do something here to let the | ||
1610 | client know about the failure!? */ | ||
1609 | return 0; | 1611 | return 0; |
1610 | } | 1612 | } |
1611 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1613 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1659,8 +1661,9 @@ handle_client_send (void *cls, | |||
1659 | if (n == NULL) | 1661 | if (n == NULL) |
1660 | { | 1662 | { |
1661 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1663 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1662 | "Not yet connected to `%4s', will try to establish connection\n", | 1664 | "Not yet connected to `%4s', will try to establish connection within %llu ms\n", |
1663 | GNUNET_i2s (&sm->peer)); | 1665 | GNUNET_i2s (&sm->peer), |
1666 | sm->deadline.value); | ||
1664 | msize += sizeof (struct SendMessage); | 1667 | msize += sizeof (struct SendMessage); |
1665 | /* ask transport to connect to the peer */ | 1668 | /* ask transport to connect to the peer */ |
1666 | /* FIXME: this code does not handle the | 1669 | /* FIXME: this code does not handle the |
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index e1b3dcd0d..1151f3ebb 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include "gnunet_scheduler_lib.h" | 34 | #include "gnunet_scheduler_lib.h" |
35 | #include "gnunet_transport_service.h" | 35 | #include "gnunet_transport_service.h" |
36 | 36 | ||
37 | #define VERBOSE GNUNET_NO | 37 | #define VERBOSE GNUNET_YES |
38 | 38 | ||
39 | #define START_ARM GNUNET_YES | 39 | #define START_ARM GNUNET_YES |
40 | 40 | ||
diff --git a/src/core/test_core_api_peer1.conf b/src/core/test_core_api_peer1.conf index fb060e3e6..3c7020688 100644 --- a/src/core/test_core_api_peer1.conf +++ b/src/core/test_core_api_peer1.conf | |||
@@ -9,9 +9,9 @@ PORT = 12464 | |||
9 | [transport] | 9 | [transport] |
10 | PORT = 12465 | 10 | PORT = 12465 |
11 | PLUGINS = tcp | 11 | PLUGINS = tcp |
12 | #PREFIX = xterm -T transport1 -e | 12 | PREFIX = xterm -T transport1 -e |
13 | #PREFIX = xterm -T transport1 -e valgrind --tool=memcheck | 13 | #PREFIX = xterm -T transport1 -e valgrind --tool=memcheck |
14 | #DEBUG = YES | 14 | DEBUG = YES |
15 | 15 | ||
16 | [arm] | 16 | [arm] |
17 | PORT = 12466 | 17 | PORT = 12466 |
@@ -33,8 +33,8 @@ PORT = 12469 | |||
33 | PORT = 12470 | 33 | PORT = 12470 |
34 | #PREFIX = xterm -T core1 -e valgrind --tool=memcheck | 34 | #PREFIX = xterm -T core1 -e valgrind --tool=memcheck |
35 | #PREFIX = xterm -T core1 -e gdb -x cmd --args | 35 | #PREFIX = xterm -T core1 -e gdb -x cmd --args |
36 | #PREFIX = xterm -T core1 -e | 36 | PREFIX = xterm -T core1 -e |
37 | #DEBUG = YES | 37 | DEBUG = YES |
38 | 38 | ||
39 | [testing] | 39 | [testing] |
40 | WEAKRANDOM = YES | 40 | WEAKRANDOM = YES |
diff --git a/src/core/test_core_api_peer2.conf b/src/core/test_core_api_peer2.conf index e3862da0f..2e994d27a 100644 --- a/src/core/test_core_api_peer2.conf +++ b/src/core/test_core_api_peer2.conf | |||
@@ -9,9 +9,9 @@ PORT = 22464 | |||
9 | [transport] | 9 | [transport] |
10 | PORT = 22465 | 10 | PORT = 22465 |
11 | PLUGINS = tcp | 11 | PLUGINS = tcp |
12 | #PREFIX = xterm -T transport2 -e | 12 | PREFIX = xterm -T transport2 -e |
13 | #PREFIX = xterm -T transport2 -e valgrind --tool=memcheck | 13 | #PREFIX = xterm -T transport2 -e valgrind --tool=memcheck |
14 | #DEBUG = YES | 14 | DEBUG = YES |
15 | 15 | ||
16 | [arm] | 16 | [arm] |
17 | PORT = 22466 | 17 | PORT = 22466 |
@@ -31,9 +31,9 @@ PORT = 22469 | |||
31 | 31 | ||
32 | [core] | 32 | [core] |
33 | PORT = 22470 | 33 | PORT = 22470 |
34 | #PREFIX = xterm -T core2 -e | 34 | PREFIX = xterm -T core2 -e |
35 | #PREFIX = xterm -T core2 -e valgrind --tool=memcheck | 35 | #PREFIX = xterm -T core2 -e valgrind --tool=memcheck |
36 | #DEBUG = YES | 36 | DEBUG = YES |
37 | 37 | ||
38 | [testing] | 38 | [testing] |
39 | WEAKRANDOM = YES | 39 | WEAKRANDOM = YES |
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 61b572eb8..afc9b0bcb 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -217,6 +217,20 @@ void GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls); | |||
217 | */ | 217 | */ |
218 | const char *GNUNET_i2s (const struct GNUNET_PeerIdentity *pid); | 218 | const char *GNUNET_i2s (const struct GNUNET_PeerIdentity *pid); |
219 | 219 | ||
220 | |||
221 | /** | ||
222 | * Convert a "struct sockaddr*" (IPv4 or IPv6 address) to a string | ||
223 | * (for printing debug messages). This is one of the very few calls | ||
224 | * in the entire API that is NOT reentrant! | ||
225 | * | ||
226 | * @param addr the address | ||
227 | * @param addrlen the length of the address | ||
228 | * @return nicely formatted string for the address | ||
229 | * will be overwritten by next call to GNUNET_a2s. | ||
230 | */ | ||
231 | const char *GNUNET_a2s (const struct sockaddr *addr, | ||
232 | socklen_t addrlen); | ||
233 | |||
220 | /** | 234 | /** |
221 | * Convert error type to string. | 235 | * Convert error type to string. |
222 | * | 236 | * |
diff --git a/src/resolver/test_resolver_api.c b/src/resolver/test_resolver_api.c index 240879d73..cadd52e0c 100644 --- a/src/resolver/test_resolver_api.c +++ b/src/resolver/test_resolver_api.c | |||
@@ -44,26 +44,9 @@ check_hostname (void *cls, const struct sockaddr *sa, socklen_t salen) | |||
44 | (*ok) &= ~8; | 44 | (*ok) &= ~8; |
45 | return; | 45 | return; |
46 | } | 46 | } |
47 | if (salen == sizeof (struct sockaddr_in)) | 47 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
48 | { | 48 | _("Got IP address `%s' for our host.\n"), |
49 | struct sockaddr_in *in = (struct sockaddr_in *) sa; | 49 | GNUNET_a2s (sa, salen)); |
50 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
51 | _("Got IP address `%s' for our host.\n"), | ||
52 | inet_ntop (AF_INET, &in->sin_addr, buf, sizeof (buf))); | ||
53 | } | ||
54 | else if (salen == sizeof (struct sockaddr_in6)) | ||
55 | { | ||
56 | struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) sa; | ||
57 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
58 | _("Got IP address `%s' for our host.\n"), | ||
59 | inet_ntop (AF_INET6, &in6->sin6_addr, buf, sizeof (buf))); | ||
60 | } | ||
61 | else | ||
62 | { | ||
63 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
64 | _("Got address of bogus length %u\n"), salen); | ||
65 | GNUNET_assert (0); | ||
66 | } | ||
67 | } | 50 | } |
68 | 51 | ||
69 | 52 | ||
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index c44d5ef04..18b50b38a 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -753,6 +753,8 @@ transmit_to_client_callback (void *cls, size_t size, void *buf) | |||
753 | 753 | ||
754 | if (buf == NULL) | 754 | if (buf == NULL) |
755 | { | 755 | { |
756 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
757 | "Transmission to client failed, closing connection.\n"); | ||
756 | /* fatal error with client, free message queue! */ | 758 | /* fatal error with client, free message queue! */ |
757 | while (NULL != (q = client->message_queue_head)) | 759 | while (NULL != (q = client->message_queue_head)) |
758 | { | 760 | { |
@@ -927,9 +929,15 @@ transmit_send_continuation (void *cls, | |||
927 | GNUNET_assert (rl != NULL); | 929 | GNUNET_assert (rl != NULL); |
928 | } | 930 | } |
929 | if (result == GNUNET_OK) | 931 | if (result == GNUNET_OK) |
930 | rl->timeout = GNUNET_TIME_relative_to_absolute (IDLE_CONNECTION_TIMEOUT); | 932 | { |
933 | rl->timeout = GNUNET_TIME_relative_to_absolute (IDLE_CONNECTION_TIMEOUT); | ||
934 | } | ||
931 | else | 935 | else |
932 | rl->connected = GNUNET_NO; | 936 | { |
937 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
938 | "Transmission failed, marking connection as down.\n"); | ||
939 | rl->connected = GNUNET_NO; | ||
940 | } | ||
933 | if (!mq->internal_msg) | 941 | if (!mq->internal_msg) |
934 | rl->transmit_ready = GNUNET_YES; | 942 | rl->transmit_ready = GNUNET_YES; |
935 | if (mq->client != NULL) | 943 | if (mq->client != NULL) |
@@ -1389,7 +1397,8 @@ plugin_env_notify_address (void *cls, | |||
1389 | 1397 | ||
1390 | #if DEBUG_TRANSPORT | 1398 | #if DEBUG_TRANSPORT |
1391 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1399 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1392 | "Plugin `%s' informs us about a new address\n", name); | 1400 | "Plugin `%s' informs us about a new address `%s'\n", name, |
1401 | GNUNET_a2s(addr, addrlen)); | ||
1393 | #endif | 1402 | #endif |
1394 | abex = GNUNET_TIME_relative_to_absolute (expires); | 1403 | abex = GNUNET_TIME_relative_to_absolute (expires); |
1395 | GNUNET_assert (p == find_transport (name)); | 1404 | GNUNET_assert (p == find_transport (name)); |
@@ -1618,7 +1627,7 @@ cleanup_validation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1618 | else | 1627 | else |
1619 | pos = prev->next; | 1628 | pos = prev->next; |
1620 | continue; | 1629 | continue; |
1621 | } | 1630 | } |
1622 | prev = pos; | 1631 | prev = pos; |
1623 | pos = pos->next; | 1632 | pos = pos->next; |
1624 | } | 1633 | } |
@@ -1654,6 +1663,7 @@ struct CheckHelloValidatedContext | |||
1654 | * Validation list being build. | 1663 | * Validation list being build. |
1655 | */ | 1664 | */ |
1656 | struct ValidationList *e; | 1665 | struct ValidationList *e; |
1666 | |||
1657 | }; | 1667 | }; |
1658 | 1668 | ||
1659 | 1669 | ||
@@ -1671,6 +1681,7 @@ run_validation (void *cls, | |||
1671 | struct TransportPlugin *tp; | 1681 | struct TransportPlugin *tp; |
1672 | struct ValidationAddress *va; | 1682 | struct ValidationAddress *va; |
1673 | struct ValidationChallengeMessage *vcm; | 1683 | struct ValidationChallengeMessage *vcm; |
1684 | struct GNUNET_PeerIdentity id; | ||
1674 | 1685 | ||
1675 | tp = find_transport (tname); | 1686 | tp = find_transport (tname); |
1676 | if (tp == NULL) | 1687 | if (tp == NULL) |
@@ -1682,6 +1693,16 @@ run_validation (void *cls, | |||
1682 | tname); | 1693 | tname); |
1683 | return GNUNET_OK; | 1694 | return GNUNET_OK; |
1684 | } | 1695 | } |
1696 | GNUNET_CRYPTO_hash (&e->publicKey, | ||
1697 | sizeof (struct | ||
1698 | GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | ||
1699 | &id.hashPubKey); | ||
1700 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1701 | "Scheduling validation of address `%s' via `%s' for `%4s'\n", | ||
1702 | GNUNET_a2s(addr, addrlen), | ||
1703 | tname, | ||
1704 | GNUNET_i2s(&id)); | ||
1705 | |||
1685 | va = GNUNET_malloc (sizeof (struct ValidationAddress) + | 1706 | va = GNUNET_malloc (sizeof (struct ValidationAddress) + |
1686 | sizeof (struct ValidationChallengeMessage) + addrlen); | 1707 | sizeof (struct ValidationChallengeMessage) + addrlen); |
1687 | va->next = e->addresses; | 1708 | va->next = e->addresses; |
@@ -1699,7 +1720,7 @@ run_validation (void *cls, | |||
1699 | vcm->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_HELLO); | 1720 | vcm->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_HELLO); |
1700 | vcm->challenge = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, | 1721 | vcm->challenge = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, |
1701 | (unsigned int) -1); | 1722 | (unsigned int) -1); |
1702 | /* Note: vcm->target is set in check_hello_validated */ | 1723 | vcm->target = id; |
1703 | memcpy (&vcm[1], addr, addrlen); | 1724 | memcpy (&vcm[1], addr, addrlen); |
1704 | return GNUNET_OK; | 1725 | return GNUNET_OK; |
1705 | } | 1726 | } |
@@ -1752,10 +1773,6 @@ check_hello_validated (void *cls, | |||
1752 | va = chvc->e->addresses; | 1773 | va = chvc->e->addresses; |
1753 | while (va != NULL) | 1774 | while (va != NULL) |
1754 | { | 1775 | { |
1755 | GNUNET_CRYPTO_hash (&chvc->e->publicKey, | ||
1756 | sizeof (struct | ||
1757 | GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | ||
1758 | &va->msg->target.hashPubKey); | ||
1759 | #if DEBUG_TRANSPORT | 1776 | #if DEBUG_TRANSPORT |
1760 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1777 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1761 | "Establishing `%s' connection to validate `%s' of `%4s' (sending our `%s')\n", | 1778 | "Establishing `%s' connection to validate `%s' of `%4s' (sending our `%s')\n", |
@@ -1841,6 +1858,11 @@ process_hello (struct TransportPlugin *plugin, | |||
1841 | GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))) | 1858 | GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))) |
1842 | { | 1859 | { |
1843 | /* TODO: call to stats? */ | 1860 | /* TODO: call to stats? */ |
1861 | #if DEBUG_TRANSPORT | ||
1862 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1863 | "`%s' message for peer `%4s' is already pending; ignoring new message\n", | ||
1864 | "HELLO", GNUNET_i2s (&target)); | ||
1865 | #endif | ||
1844 | return GNUNET_OK; | 1866 | return GNUNET_OK; |
1845 | } | 1867 | } |
1846 | e = e->next; | 1868 | e = e->next; |
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 6ebb257a1..4ab555ad6 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include "plugin_transport.h" | 38 | #include "plugin_transport.h" |
39 | #include "transport.h" | 39 | #include "transport.h" |
40 | 40 | ||
41 | #define DEBUG_TCP GNUNET_NO | 41 | #define DEBUG_TCP GNUNET_YES |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * After how long do we expire an address that we | 44 | * After how long do we expire an address that we |
@@ -440,8 +440,6 @@ connect_and_create_session (struct Plugin *plugin, | |||
440 | struct GNUNET_NETWORK_SocketHandle *conn; | 440 | struct GNUNET_NETWORK_SocketHandle *conn; |
441 | struct Session *session; | 441 | struct Session *session; |
442 | int af; | 442 | int af; |
443 | char buf[INET6_ADDRSTRLEN]; | ||
444 | uint16_t port; | ||
445 | 443 | ||
446 | session = plugin->sessions; | 444 | session = plugin->sessions; |
447 | while (session != NULL) | 445 | while (session != NULL) |
@@ -456,20 +454,9 @@ connect_and_create_session (struct Plugin *plugin, | |||
456 | } | 454 | } |
457 | 455 | ||
458 | if (addrlen == sizeof (struct sockaddr_in)) | 456 | if (addrlen == sizeof (struct sockaddr_in)) |
459 | { | 457 | af = AF_INET; |
460 | af = AF_INET; | ||
461 | inet_ntop (af, | ||
462 | &((struct sockaddr_in *) addr)->sin_addr, buf, sizeof (buf)); | ||
463 | port = ntohs (((struct sockaddr_in *) addr)->sin_port); | ||
464 | } | ||
465 | else if (addrlen == sizeof (struct sockaddr_in6)) | 458 | else if (addrlen == sizeof (struct sockaddr_in6)) |
466 | { | 459 | af = AF_INET6; |
467 | af = AF_INET6; | ||
468 | inet_ntop (af, | ||
469 | &((struct sockaddr_in6 *) addr)->sin6_addr, | ||
470 | buf, sizeof (buf)); | ||
471 | port = ntohs (((struct sockaddr_in6 *) addr)->sin6_port); | ||
472 | } | ||
473 | else | 460 | else |
474 | { | 461 | { |
475 | GNUNET_break_op (0); | 462 | GNUNET_break_op (0); |
@@ -485,8 +472,8 @@ connect_and_create_session (struct Plugin *plugin, | |||
485 | #if DEBUG_TCP | 472 | #if DEBUG_TCP |
486 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | 473 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, |
487 | "tcp", | 474 | "tcp", |
488 | "Failed to create connection to peer at `%s:%u'.\n", | 475 | "Failed to create connection to peer at `%s'.\n", |
489 | buf, port); | 476 | GNUNET_a2s(addr, addrlen)); |
490 | #endif | 477 | #endif |
491 | return NULL; | 478 | return NULL; |
492 | } | 479 | } |
@@ -499,8 +486,10 @@ connect_and_create_session (struct Plugin *plugin, | |||
499 | #if DEBUG_TCP | 486 | #if DEBUG_TCP |
500 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | 487 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, |
501 | "tcp", | 488 | "tcp", |
502 | "Creating new session %p with `%s:%u' based on `%s' request.\n", | 489 | "Creating new session %p with `%s' based on `%s' request.\n", |
503 | session, buf, port, "send_to"); | 490 | session, |
491 | GNUNET_a2s(addr, addrlen), | ||
492 | "send_to"); | ||
504 | #endif | 493 | #endif |
505 | return session; | 494 | return session; |
506 | } | 495 | } |
@@ -541,7 +530,9 @@ do_transmit (void *cls, size_t size, void *buf) | |||
541 | { | 530 | { |
542 | #if DEBUG_TCP | 531 | #if DEBUG_TCP |
543 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | 532 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, |
544 | "tcp", "Timeout trying to transmit\n"); | 533 | "tcp", |
534 | "Timeout trying to transmit to peer `%4s', discarding message queue.\n", | ||
535 | GNUNET_i2s(&session->target)); | ||
545 | #endif | 536 | #endif |
546 | /* timeout */ | 537 | /* timeout */ |
547 | while (NULL != (pm = session->pending_messages)) | 538 | while (NULL != (pm = session->pending_messages)) |
@@ -1095,7 +1086,11 @@ tcp_plugin_cancel (void *cls, | |||
1095 | struct PendingMessage *pm; | 1086 | struct PendingMessage *pm; |
1096 | struct Session *session; | 1087 | struct Session *session; |
1097 | struct Session *next; | 1088 | struct Session *next; |
1098 | 1089 | ||
1090 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | ||
1091 | "tcp", | ||
1092 | "Asked to close session with `%4s'\n", | ||
1093 | GNUNET_i2s(target)); | ||
1099 | session = plugin->sessions; | 1094 | session = plugin->sessions; |
1100 | while (session != NULL) | 1095 | while (session != NULL) |
1101 | { | 1096 | { |
@@ -1315,8 +1310,6 @@ tcp_plugin_address_suggested (void *cls, const void *addr, size_t addrlen) | |||
1315 | char buf[sizeof (struct sockaddr_in6)]; | 1310 | char buf[sizeof (struct sockaddr_in6)]; |
1316 | struct sockaddr_in *v4; | 1311 | struct sockaddr_in *v4; |
1317 | struct sockaddr_in6 *v6; | 1312 | struct sockaddr_in6 *v6; |
1318 | char dst[INET6_ADDRSTRLEN]; | ||
1319 | uint16_t port; | ||
1320 | 1313 | ||
1321 | if ((addrlen != sizeof (struct sockaddr_in)) && | 1314 | if ((addrlen != sizeof (struct sockaddr_in)) && |
1322 | (addrlen != sizeof (struct sockaddr_in6))) | 1315 | (addrlen != sizeof (struct sockaddr_in6))) |
@@ -1329,21 +1322,17 @@ tcp_plugin_address_suggested (void *cls, const void *addr, size_t addrlen) | |||
1329 | { | 1322 | { |
1330 | v4 = (struct sockaddr_in *) buf; | 1323 | v4 = (struct sockaddr_in *) buf; |
1331 | v4->sin_port = htons (check_port (plugin, ntohs (v4->sin_port))); | 1324 | v4->sin_port = htons (check_port (plugin, ntohs (v4->sin_port))); |
1332 | inet_ntop (AF_INET, &v4->sin_addr, dst, sizeof (dst)); | ||
1333 | port = ntohs (v4->sin_port); | ||
1334 | } | 1325 | } |
1335 | else | 1326 | else |
1336 | { | 1327 | { |
1337 | v6 = (struct sockaddr_in6 *) buf; | 1328 | v6 = (struct sockaddr_in6 *) buf; |
1338 | v6->sin6_port = htons (check_port (plugin, ntohs (v6->sin6_port))); | 1329 | v6->sin6_port = htons (check_port (plugin, ntohs (v6->sin6_port))); |
1339 | inet_ntop (AF_INET6, &v6->sin6_addr, dst, sizeof (dst)); | ||
1340 | port = ntohs (v6->sin6_port); | ||
1341 | } | 1330 | } |
1342 | #if DEBUG_TCP | 1331 | #if DEBUG_TCP |
1343 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | 1332 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, |
1344 | "tcp", | 1333 | "tcp", |
1345 | "Informing transport service about my address `%s:%u'.\n", | 1334 | "Informing transport service about my address `%s'.\n", |
1346 | dst, port); | 1335 | GNUNET_a2s(addr, addrlen)); |
1347 | #endif | 1336 | #endif |
1348 | plugin->env->notify_address (plugin->env->cls, | 1337 | plugin->env->notify_address (plugin->env->cls, |
1349 | "tcp", | 1338 | "tcp", |
@@ -1627,7 +1616,6 @@ process_interfaces (void *cls, | |||
1627 | const struct sockaddr *addr, socklen_t addrlen) | 1616 | const struct sockaddr *addr, socklen_t addrlen) |
1628 | { | 1617 | { |
1629 | struct Plugin *plugin = cls; | 1618 | struct Plugin *plugin = cls; |
1630 | char dst[INET6_ADDRSTRLEN]; | ||
1631 | int af; | 1619 | int af; |
1632 | struct sockaddr_in *v4; | 1620 | struct sockaddr_in *v4; |
1633 | struct sockaddr_in6 *v6; | 1621 | struct sockaddr_in6 *v6; |
@@ -1636,19 +1624,18 @@ process_interfaces (void *cls, | |||
1636 | if (af == AF_INET) | 1624 | if (af == AF_INET) |
1637 | { | 1625 | { |
1638 | v4 = (struct sockaddr_in *) addr; | 1626 | v4 = (struct sockaddr_in *) addr; |
1639 | inet_ntop (AF_INET, &v4->sin_addr, dst, sizeof (dst)); | ||
1640 | v4->sin_port = htons (plugin->adv_port); | 1627 | v4->sin_port = htons (plugin->adv_port); |
1641 | } | 1628 | } |
1642 | else | 1629 | else |
1643 | { | 1630 | { |
1644 | GNUNET_assert (af == AF_INET6); | 1631 | GNUNET_assert (af == AF_INET6); |
1645 | v6 = (struct sockaddr_in6 *) addr; | 1632 | v6 = (struct sockaddr_in6 *) addr; |
1646 | inet_ntop (AF_INET6, &v6->sin6_addr, dst, sizeof (dst)); | ||
1647 | v6->sin6_port = htons (plugin->adv_port); | 1633 | v6->sin6_port = htons (plugin->adv_port); |
1648 | } | 1634 | } |
1649 | GNUNET_log_from (GNUNET_ERROR_TYPE_INFO | | 1635 | GNUNET_log_from (GNUNET_ERROR_TYPE_INFO | |
1650 | GNUNET_ERROR_TYPE_BULK, | 1636 | GNUNET_ERROR_TYPE_BULK, |
1651 | "tcp", _("Found address `%s' (%s)\n"), dst, name); | 1637 | "tcp", _("Found address `%s' (%s)\n"), |
1638 | GNUNET_a2s(addr, addrlen), name); | ||
1652 | plugin->env->notify_address (plugin->env->cls, | 1639 | plugin->env->notify_address (plugin->env->cls, |
1653 | "tcp", | 1640 | "tcp", |
1654 | addr, addrlen, GNUNET_TIME_UNIT_FOREVER_REL); | 1641 | addr, addrlen, GNUNET_TIME_UNIT_FOREVER_REL); |
diff --git a/src/transport/transport.h b/src/transport/transport.h index 8e1291005..8ad26f2c1 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "gnunet_time_lib.h" | 27 | #include "gnunet_time_lib.h" |
28 | #include "gnunet_transport_service.h" | 28 | #include "gnunet_transport_service.h" |
29 | 29 | ||
30 | #define DEBUG_TRANSPORT GNUNET_NO | 30 | #define DEBUG_TRANSPORT GNUNET_YES |
31 | 31 | ||
32 | /** | 32 | /** |
33 | * For how long do we allow unused bandwidth | 33 | * For how long do we allow unused bandwidth |
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index 8bca5084d..f7ce56afc 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -1564,16 +1564,17 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg) | |||
1564 | remove_neighbour (h, &dim->peer); | 1564 | remove_neighbour (h, &dim->peer); |
1565 | break; | 1565 | break; |
1566 | case GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK: | 1566 | case GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK: |
1567 | #if DEBUG_TRANSPORT | ||
1568 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1569 | "Receiving `%s' message.\n", "SEND_OK"); | ||
1570 | #endif | ||
1571 | if (size != sizeof (struct SendOkMessage)) | 1567 | if (size != sizeof (struct SendOkMessage)) |
1572 | { | 1568 | { |
1573 | GNUNET_break (0); | 1569 | GNUNET_break (0); |
1574 | break; | 1570 | break; |
1575 | } | 1571 | } |
1576 | okm = (const struct SendOkMessage *) msg; | 1572 | okm = (const struct SendOkMessage *) msg; |
1573 | #if DEBUG_TRANSPORT | ||
1574 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1575 | "Receiving `%s' message, transmission %s.\n", "SEND_OK", | ||
1576 | ntohl(okm->success) == GNUNET_OK ? "succeeded" : "failed"); | ||
1577 | #endif | ||
1577 | n = find_neighbour (h, &okm->peer); | 1578 | n = find_neighbour (h, &okm->peer); |
1578 | GNUNET_assert (n != NULL); | 1579 | GNUNET_assert (n != NULL); |
1579 | n->transmit_ok = GNUNET_YES; | 1580 | n->transmit_ok = GNUNET_YES; |
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index 2fdd17ca7..8ea099122 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -398,6 +398,52 @@ GNUNET_i2s (const struct GNUNET_PeerIdentity *pid) | |||
398 | return (const char *) ret.encoding; | 398 | return (const char *) ret.encoding; |
399 | } | 399 | } |
400 | 400 | ||
401 | |||
402 | |||
403 | /** | ||
404 | * Convert a "struct sockaddr*" (IPv4 or IPv6 address) to a string | ||
405 | * (for printing debug messages). This is one of the very few calls | ||
406 | * in the entire API that is NOT reentrant! | ||
407 | * | ||
408 | * @param addr the address | ||
409 | * @param addrlen the length of the address | ||
410 | * @return nicely formatted string for the address | ||
411 | * will be overwritten by next call to GNUNET_a2s. | ||
412 | */ | ||
413 | const char *GNUNET_a2s (const struct sockaddr *addr, | ||
414 | socklen_t addrlen) | ||
415 | { | ||
416 | static char buf[INET6_ADDRSTRLEN+8]; | ||
417 | static char b2[6]; | ||
418 | const struct sockaddr_in * v4; | ||
419 | const struct sockaddr_in6 *v6; | ||
420 | switch (addr->sa_family) | ||
421 | { | ||
422 | case AF_INET: | ||
423 | v4 = (const struct sockaddr_in*)addr; | ||
424 | inet_ntop(AF_INET, &v4->sin_addr, buf, INET_ADDRSTRLEN); | ||
425 | if (0 == ntohs(v4->sin_port)) | ||
426 | return buf; | ||
427 | strcat (buf, ":"); | ||
428 | sprintf (b2, "%u", ntohs(v4->sin_port)); | ||
429 | strcat (buf, b2); | ||
430 | return buf; | ||
431 | case AF_INET6: | ||
432 | v6 = (const struct sockaddr_in6*)addr; | ||
433 | buf[0] = '['; | ||
434 | inet_ntop(AF_INET6, &v6->sin6_addr, &buf[1], INET6_ADDRSTRLEN); | ||
435 | if (0 == ntohs(v6->sin6_port)) | ||
436 | return &buf[1]; | ||
437 | strcat (buf, "]:"); | ||
438 | sprintf (b2, "%u", ntohs(v6->sin6_port)); | ||
439 | strcat (buf, b2); | ||
440 | return buf; | ||
441 | default: | ||
442 | return _("invalid address"); | ||
443 | } | ||
444 | } | ||
445 | |||
446 | |||
401 | /** | 447 | /** |
402 | * Initializer | 448 | * Initializer |
403 | */ | 449 | */ |
diff --git a/src/util/network.c b/src/util/network.c index 7fd6f6c47..0526bc844 100644 --- a/src/util/network.c +++ b/src/util/network.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include "gnunet_network_lib.h" | 40 | #include "gnunet_network_lib.h" |
41 | #include "gnunet_scheduler_lib.h" | 41 | #include "gnunet_scheduler_lib.h" |
42 | 42 | ||
43 | #define DEBUG_NETWORK GNUNET_NO | 43 | #define DEBUG_NETWORK GNUNET_YES |
44 | 44 | ||
45 | struct GNUNET_NETWORK_TransmitHandle | 45 | struct GNUNET_NETWORK_TransmitHandle |
46 | { | 46 | { |
@@ -234,9 +234,7 @@ GNUNET_NETWORK_socket_create_from_accept (struct GNUNET_SCHEDULER_Handle | |||
234 | { | 234 | { |
235 | struct GNUNET_NETWORK_SocketHandle *ret; | 235 | struct GNUNET_NETWORK_SocketHandle *ret; |
236 | char addr[32]; | 236 | char addr[32]; |
237 | char msg[INET6_ADDRSTRLEN]; | ||
238 | socklen_t addrlen; | 237 | socklen_t addrlen; |
239 | int fam; | ||
240 | int fd; | 238 | int fd; |
241 | int aret; | 239 | int aret; |
242 | struct sockaddr_in *v4; | 240 | struct sockaddr_in *v4; |
@@ -287,19 +285,9 @@ GNUNET_NETWORK_socket_create_from_accept (struct GNUNET_SCHEDULER_Handle | |||
287 | (GNUNET_YES != (aret = access (access_cls, uaddr, addrlen)))) | 285 | (GNUNET_YES != (aret = access (access_cls, uaddr, addrlen)))) |
288 | { | 286 | { |
289 | if (aret == GNUNET_NO) | 287 | if (aret == GNUNET_NO) |
290 | { | 288 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
291 | fam = ((struct sockaddr *) addr)->sa_family; | 289 | _("Access denied to `%s'\n"), |
292 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 290 | GNUNET_a2s(uaddr, addrlen)); |
293 | _("Access denied to `%s'\n"), | ||
294 | inet_ntop (fam, | ||
295 | (fam == AF_INET6) | ||
296 | ? (const void *) &((struct sockaddr_in6 *) | ||
297 | &addr)->sin6_addr : (const | ||
298 | void | ||
299 | *) | ||
300 | &((struct sockaddr_in *) &addr)->sin_addr, | ||
301 | msg, sizeof (msg))); | ||
302 | } | ||
303 | GNUNET_break (0 == SHUTDOWN (fd, SHUT_RDWR)); | 291 | GNUNET_break (0 == SHUTDOWN (fd, SHUT_RDWR)); |
304 | GNUNET_break (0 == CLOSE (fd)); | 292 | GNUNET_break (0 == CLOSE (fd)); |
305 | GNUNET_free (uaddr); | 293 | GNUNET_free (uaddr); |
@@ -493,12 +481,22 @@ connect_continuation (void *cls, | |||
493 | (0 != getsockopt (sock->sock, SOL_SOCKET, SO_ERROR, &error, &len)) || | 481 | (0 != getsockopt (sock->sock, SOL_SOCKET, SO_ERROR, &error, &len)) || |
494 | (error != 0) || (errno != 0)) | 482 | (error != 0) || (errno != 0)) |
495 | { | 483 | { |
484 | #if DEBUG_NETWORK | ||
485 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
486 | "Failed to establish TCP connection to `%s'\n", | ||
487 | GNUNET_a2s(sock->addr, sock->addrlen)); | ||
488 | #endif | ||
496 | /* connect failed / timed out */ | 489 | /* connect failed / timed out */ |
497 | GNUNET_break (0 == CLOSE (sock->sock)); | 490 | GNUNET_break (0 == CLOSE (sock->sock)); |
498 | sock->sock = -1; | 491 | sock->sock = -1; |
499 | if (GNUNET_SYSERR == try_connect (sock)) | 492 | if (GNUNET_SYSERR == try_connect (sock)) |
500 | { | 493 | { |
501 | /* failed for good */ | 494 | /* failed for good */ |
495 | #if DEBUG_NETWORK | ||
496 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
497 | "Failed to establish TCP connection, no further addresses to try.\n"); | ||
498 | #endif | ||
499 | /* connect failed / timed out */ | ||
502 | GNUNET_break (sock->ai_pos == NULL); | 500 | GNUNET_break (sock->ai_pos == NULL); |
503 | freeaddrinfo (sock->ai); | 501 | freeaddrinfo (sock->ai); |
504 | sock->ai = NULL; | 502 | sock->ai = NULL; |
@@ -1052,10 +1050,6 @@ transmit_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1052 | ssize_t ret; | 1050 | ssize_t ret; |
1053 | size_t have; | 1051 | size_t have; |
1054 | 1052 | ||
1055 | #if DEBUG_NETWORK | ||
1056 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1057 | "Transmit ready called --- will try to send\n"); | ||
1058 | #endif | ||
1059 | GNUNET_assert (sock->write_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK); | 1053 | GNUNET_assert (sock->write_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK); |
1060 | sock->write_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK; | 1054 | sock->write_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK; |
1061 | if (sock->connect_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK) | 1055 | if (sock->connect_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK) |
@@ -1091,6 +1085,10 @@ transmit_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1091 | #endif | 1085 | #endif |
1092 | goto SCHEDULE_WRITE; | 1086 | goto SCHEDULE_WRITE; |
1093 | } | 1087 | } |
1088 | #if DEBUG_NETWORK | ||
1089 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1090 | "Transmit ready called --- will try to send\n"); | ||
1091 | #endif | ||
1094 | GNUNET_assert (sock->write_buffer_off >= sock->write_buffer_pos); | 1092 | GNUNET_assert (sock->write_buffer_off >= sock->write_buffer_pos); |
1095 | process_notify (sock); | 1093 | process_notify (sock); |
1096 | have = sock->write_buffer_off - sock->write_buffer_pos; | 1094 | have = sock->write_buffer_off - sock->write_buffer_pos; |
diff --git a/src/util/service.c b/src/util/service.c index cf9703235..8d72a749a 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -620,34 +620,26 @@ check_access (void *cls, const struct sockaddr *addr, socklen_t addrlen) | |||
620 | const struct sockaddr_in *i4; | 620 | const struct sockaddr_in *i4; |
621 | const struct sockaddr_in6 *i6; | 621 | const struct sockaddr_in6 *i6; |
622 | int ret; | 622 | int ret; |
623 | char buf[INET6_ADDRSTRLEN]; | ||
624 | uint16_t port; | ||
625 | 623 | ||
626 | switch (addr->sa_family) | 624 | switch (addr->sa_family) |
627 | { | 625 | { |
628 | case AF_INET: | 626 | case AF_INET: |
629 | GNUNET_assert (addrlen == sizeof (struct sockaddr_in)); | 627 | GNUNET_assert (addrlen == sizeof (struct sockaddr_in)); |
630 | i4 = (const struct sockaddr_in *) addr; | 628 | i4 = (const struct sockaddr_in *) addr; |
631 | port = ntohs (i4->sin_port); | ||
632 | ret = ((sctx->v4_allowed == NULL) || | 629 | ret = ((sctx->v4_allowed == NULL) || |
633 | (check_ipv4_listed (sctx->v4_allowed, | 630 | (check_ipv4_listed (sctx->v4_allowed, |
634 | &i4->sin_addr))) | 631 | &i4->sin_addr))) |
635 | && ((sctx->v4_denied == NULL) || | 632 | && ((sctx->v4_denied == NULL) || |
636 | (!check_ipv4_listed (sctx->v4_denied, &i4->sin_addr))); | 633 | (!check_ipv4_listed (sctx->v4_denied, &i4->sin_addr))); |
637 | if (ret != GNUNET_OK) | ||
638 | inet_ntop (AF_INET, &i4->sin_addr, buf, sizeof (buf)); | ||
639 | break; | 634 | break; |
640 | case AF_INET6: | 635 | case AF_INET6: |
641 | GNUNET_assert (addrlen == sizeof (struct sockaddr_in6)); | 636 | GNUNET_assert (addrlen == sizeof (struct sockaddr_in6)); |
642 | i6 = (const struct sockaddr_in6 *) addr; | 637 | i6 = (const struct sockaddr_in6 *) addr; |
643 | port = ntohs (i6->sin6_port); | ||
644 | ret = ((sctx->v6_allowed == NULL) || | 638 | ret = ((sctx->v6_allowed == NULL) || |
645 | (check_ipv6_listed (sctx->v6_allowed, | 639 | (check_ipv6_listed (sctx->v6_allowed, |
646 | &i6->sin6_addr))) | 640 | &i6->sin6_addr))) |
647 | && ((sctx->v6_denied == NULL) || | 641 | && ((sctx->v6_denied == NULL) || |
648 | (!check_ipv6_listed (sctx->v6_denied, &i6->sin6_addr))); | 642 | (!check_ipv6_listed (sctx->v6_denied, &i6->sin6_addr))); |
649 | if (ret != GNUNET_OK) | ||
650 | inet_ntop (AF_INET6, &i6->sin6_addr, buf, sizeof (buf)); | ||
651 | break; | 643 | break; |
652 | default: | 644 | default: |
653 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 645 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -657,8 +649,8 @@ check_access (void *cls, const struct sockaddr *addr, socklen_t addrlen) | |||
657 | if (ret != GNUNET_OK) | 649 | if (ret != GNUNET_OK) |
658 | { | 650 | { |
659 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 651 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
660 | _("Access from `%s:%u' denied to service `%s'\n"), | 652 | _("Access from `%s' denied to service `%s'\n"), |
661 | buf, port, sctx->serviceName); | 653 | GNUNET_a2s(addr, addrlen), sctx->serviceName); |
662 | } | 654 | } |
663 | return ret; | 655 | return ret; |
664 | } | 656 | } |