Changeset e22882b


Ignore:
Timestamp:
Aug 15, 2012 2:24:40 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
442af03, 8b6a86e
Parents:
65efefb
Message:
  • More fixups from merge
  • Remove local address from thread names for thread dump anonymity
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • LICENSE.txt

    r65efefb re22882b  
    8080   See licenses/LICENSE-GPLv2.txt
    8181
    82    UPnP subsystem 1.7:
    83    Copyright (C) 2003-2006 Satoshi Konno
     82   UPnP subsystem (CyberLink) 2.1:
     83   Copyright (C) 2003-2010 Satoshi Konno
    8484   See licenses/LICENSE-UPnP.txt
    8585
  • router/java/src/org/cybergarage/http/HTTPServer.java

    r65efefb re22882b  
    5555         * @since 1.8
    5656         */
    57         public final static int DEFAULT_TIMEOUT = DEFAULT_PORT * 1000;
     57        // I2P fix
     58        //public final static int DEFAULT_TIMEOUT = DEFAULT_PORT * 1000;
     59        public final static int DEFAULT_TIMEOUT = 10 * 1000;
    5860       
    5961        public static String getName()
     
    249251        public boolean start(){
    250252                StringBuffer name = new StringBuffer("Cyber.HTTPServer/");
    251                 name.append(serverSock.getLocalSocketAddress());
     253                // I2P hide address from thread dumps
     254                //name.append(serverSock.getLocalSocketAddress());
    252255                httpServerThread = new Thread(this,name.toString());
    253256                httpServerThread.start();
  • router/java/src/org/cybergarage/upnp/ssdp/SSDPNotifySocket.java

    r65efefb re22882b  
    148148                // localAddr is null on Android m3-rc37a (01/30/08)
    149149                if (localAddr != null && 0 < localAddr.length()) {
    150                         name.append(this.getLocalAddress()).append(':');
    151                         name.append(this.getLocalPort()).append(" -> ");
     150                        // I2P hide address from thread dumps
     151                        //name.append(this.getLocalAddress()).append(':');
     152                        //name.append(this.getLocalPort()).append(" -> ");
    152153                        name.append(this.getMulticastAddress()).append(':');
    153154                        name.append(this.getMulticastPort());
  • router/java/src/org/cybergarage/upnp/ssdp/SSDPSearchResponseSocket.java

    r65efefb re22882b  
    8585                DatagramSocket s = getDatagramSocket();
    8686                // localAddr is null on Android m3-rc37a (01/30/08)
    87                 InetAddress localAddr = s.getLocalAddress();
    88                 if (localAddr != null) {
    89                         name.append(s.getLocalAddress()).append(':');
    90                         name.append(s.getLocalPort());
    91                 }
     87                // I2P hide address from thread dumps
     88                //InetAddress localAddr = s.getLocalAddress();
     89                //if (localAddr != null) {
     90                //      name.append(s.getLocalAddress()).append(':');
     91                //      name.append(s.getLocalPort());
     92                //}
    9293                deviceSearchResponseThread = new Thread(this,name.toString());
    9394                deviceSearchResponseThread.start();             
  • router/java/src/org/cybergarage/upnp/ssdp/SSDPSearchSocket.java

    r65efefb re22882b  
    175175                // localAddr is null on Android m3-rc37a (01/30/08)
    176176                if (localAddr != null && 0 < localAddr.length()) {
    177                         name.append(this.getLocalAddress()).append(':');
    178                         name.append(this.getLocalPort()).append(" -> ");
     177                        // I2P hide address from thread dumps
     178                        //name.append(this.getLocalAddress()).append(':');
     179                        //name.append(this.getLocalPort()).append(" -> ");
    179180                        name.append(this.getMulticastAddress()).append(':');
    180181                        name.append(this.getMulticastPort());
  • router/java/src/org/cybergarage/xml/Parser.java

    r65efefb re22882b  
    6262                try {
    6363                        HttpURLConnection urlCon = (HttpURLConnection)locationURL.openConnection();
     64                        // I2P mods to prevent hangs (see HTTPRequest for more info)
     65                        // this seems to work, getInputStream actually does the connect(),
     66                        // (as shown by a thread dump)
     67                        // so we can set these after openConnection()
     68                        // Alternative would be foo = new HttpURLConnection(locationURL); foo.set timeouts; foo.connect()
     69                        urlCon.setConnectTimeout(2*1000);
     70                        urlCon.setReadTimeout(1000);
    6471                        urlCon.setRequestMethod("GET");
    6572                        urlCon.setRequestProperty(HTTP.CONTENT_LENGTH,"0");
Note: See TracChangeset for help on using the changeset viewer.