]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Merge commit 'danieldg/out-12'
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 27 Oct 2008 22:19:43 +0000 (22:19 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 27 Oct 2008 22:19:43 +0000 (22:19 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10732 e03df62e-2008-0410-955e-edbf42e46eb7

.inspircd.inc
src/listensocket.cpp

index b0933f07d1e39424b80c3b91224214809cb809f0..b09ffb386ea6544ed94a442732225e18c3384f43 100644 (file)
@@ -180,17 +180,14 @@ sub valdebugunattended
        my $pid = fork;
        if ($pid == 0) {
                POSIX::setsid();
+               umask 022;
+               open STDERR, '>', "$valgrindlogpath/valdebug.$$" or die $!;
                umask 066;
                open STDIN, '/dev/null' or die $!;
                open STDOUT, '>', "$valgrindlogpath/out.$$" or die $!;
-               open STDERR, '>', "$valgrindlogpath/err.$$" or die $!;
-               umask 022;
-               exec "valgrind -v --tool=memcheck --leak-check=yes --num-callers=10 --time-stamp=yes --log-file=$valgrindlogpath/valdebug.\%p $binpath/$executable -nofork -debug -nolog";
+               exec "valgrind -v --tool=memcheck --leak-check=yes --num-callers=10 --time-stamp=yes --log-fd=2 $binpath/$executable -nofork -debug -nolog";
                exit 1;
        }
-       # Sleep 5 seconds to give valgrind time to initialize before chmodding the logdir for apache access.
-       sleep(5);
-       system("chmod 644 $valgrindlogpath/valdebug.*");
 }
 
 sub screenvaldebug
index 961156ae6f74e4b846397d6ab3ef9d4ea33446d2..313396ed7829b52a448b61069eaada1df711d274 100644 (file)
@@ -128,6 +128,10 @@ void ListenSocketBase::AcceptInternal()
        if (this->family == AF_INET6)
        {
                inet_ntop(AF_INET6, &((const sockaddr_in6*)client)->sin6_addr, buf, sizeof(buf));
+               if (!strncmp(buf, "::ffff:", 7))
+               {
+                       memmove(buf, buf+7, sizeof(buf)-7);
+               }
                socklen_t raddrsz = sizeof(sockaddr_in6);
                if (getsockname(incomingSockfd, (sockaddr*) raddr, &raddrsz) == 0)
                        inet_ntop(AF_INET6, &((const sockaddr_in6*)raddr)->sin6_addr, target, sizeof(target));