You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2006/01/31 16:44:49 UTC
svn commit: r373844 - in /apr/apr/branches/1.2.x: build/apr_common.m4
test/testsockets.c
Author: jorton
Date: Tue Jan 31 07:44:46 2006
New Revision: 373844
URL: http://svn.apache.org/viewcvs?rev=373844&view=rev
Log:
Merge r367594, r373504 from trunk:
* build/apr_common.m4 (APR_LAYOUT): Catch invalid layout names which
otherwise cause sed script errors and user confusion a la PR 38209.
* test/testsockets.c (sendto_receivefrom): Set REUSEADDR option before
binding sockets.
Modified:
apr/apr/branches/1.2.x/build/apr_common.m4
apr/apr/branches/1.2.x/test/testsockets.c
Modified: apr/apr/branches/1.2.x/build/apr_common.m4
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/build/apr_common.m4?rev=373844&r1=373843&r2=373844&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/build/apr_common.m4 (original)
+++ apr/apr/branches/1.2.x/build/apr_common.m4 Tue Jan 31 07:44:46 2006
@@ -720,6 +720,13 @@
echo "** Error: Cannot use undefined layout '$LAYOUT'"
exit 1
fi
+ # Catch layout names including a slash which will otherwise
+ # confuse the heck out of the sed script.
+ case $2 in
+ */*)
+ echo "** Error: $2 is not a valid layout name"
+ exit 1 ;;
+ esac
pldconf=./config.pld
changequote({,})
sed -e "1s/[ ]*<[lL]ayout[ ]*$2[ ]*>[ ]*//;1t" \
Modified: apr/apr/branches/1.2.x/test/testsockets.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/test/testsockets.c?rev=373844&r1=373843&r2=373844&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testsockets.c (original)
+++ apr/apr/branches/1.2.x/test/testsockets.c Tue Jan 31 07:44:46 2006
@@ -139,6 +139,11 @@
rv = apr_sockaddr_info_get(&from, addr, APR_UNSPEC, 7771, 0, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
+ rv = apr_socket_opt_set(sock, APR_SO_REUSEADDR, 1);
+ APR_ASSERT_SUCCESS(tc, "Could not set REUSEADDR on socket", rv);
+ rv = apr_socket_opt_set(sock2, APR_SO_REUSEADDR, 1);
+ APR_ASSERT_SUCCESS(tc, "Could not set REUSEADDR on socket2", rv);
+
rv = apr_socket_bind(sock, to);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
rv = apr_socket_bind(sock2, from);