[前][次][番号順一覧][スレッド一覧]

ruby-changes:27486

From: akr <ko1@a...>
Date: Thu, 28 Feb 2013 22:31:39 +0900 (JST)
Subject: [ruby-changes:27486] akr:r39538 (trunk): * ext/socket/raddrinfo.c (inspect_sockaddr): don't show that Unix

akr	2013-02-28 22:29:55 +0900 (Thu, 28 Feb 2013)

  New Revision: 39538

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39538

  Log:
    * ext/socket/raddrinfo.c (inspect_sockaddr): don't show that Unix
      domain socket filename is bigger than sizeof(sun_path).
      This limit is not rigid on some platforms such as Darwin and SunOS.

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/raddrinfo.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39537)
+++ ChangeLog	(revision 39538)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Feb 28 22:23:27 2013  Tanaka Akira  <akr@f...>
+
+	* ext/socket/raddrinfo.c (inspect_sockaddr): don't show that Unix
+	  domain socket filename is bigger than sizeof(sun_path).
+	  This limit is not rigid on some platforms such as Darwin and SunOS.
+
 Thu Feb 28 21:33:01 2013  WATANABE Hirofumi  <eban@r...>
 
 	* configure.in(AC_DISABLE_OPTION_CHECKING): avoid warning "WARNING:
Index: ext/socket/raddrinfo.c
===================================================================
--- ext/socket/raddrinfo.c	(revision 39537)
+++ ext/socket/raddrinfo.c	(revision 39538)
@@ -1048,9 +1048,6 @@ inspect_sockaddr(VALUE addrinfo, VALUE r https://github.com/ruby/ruby/blob/trunk/ext/socket/raddrinfo.c#L1048
                     while (s < e)
                         rb_str_catf(ret, ":%02x", (unsigned char)*s++);
                 }
-                if (addr->sun_path + sizeof(addr->sun_path) < (char*)&rai->addr + rai->sockaddr_len)
-                    rb_str_catf(ret, "(sockaddr %d bytes too long)",
-                            (int)(rai->sockaddr_len - (addr->sun_path + sizeof(addr->sun_path) - (char*)&rai->addr)));
             }
             break;
           }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]