Changeset d4a8595


Ignore:
Timestamp:
Sep 4, 2005 7:15:49 PM (15 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
c5579fa3
Parents:
779aa24
git-author:
jrandom <jrandom> (09/04/05 19:15:49)
git-committer:
zzz <zzz@…> (09/04/05 19:15:49)
Message:

2005-09-04 jrandom

  • Don't persist peer profiles until we are shutting down, as the persistence process gobbles RAM and wall time.
  • Bugfix to allow you to check/uncheck the sharedClient setting on the I2PTunnel web interface.
  • Be more careful when expiring a failed tunnel message fragment so we don't drop the data while attempting to read it.
Files:
3 added
19 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java

    r779aa24 rd4a8595  
    480480        _startOnLoad = true;
    481481    }
    482     public void setSharedClient(String moo) {
     482    public void setShared(String moo) {
    483483        _sharedClient=true;
     484    }
     485    public void setShared(boolean val) {
     486        _sharedClient=val;
    484487    }
    485488    public void setConnectDelay(String moo) {
  • apps/i2ptunnel/jsp/editClient.jsp

    r779aa24 rd4a8595  
    167167<td>
    168168<% if (editBean.isSharedClient(curTunnel)) { %>
    169 <input type="checkbox" value="true" name="sharedClient" checked="true" />
    170 <% } else { %>
    171 <input type="checkbox" value="true" name="sharedClient" />
     169<input type="checkbox" value="true" name="shared" checked="true" />
     170<% } else { %>
     171<input type="checkbox" value="true" name="shared" />
    172172<% } %>
    173173<i>(Share tunnels with other clients and httpclients? Change requires restart of client proxy)</i>
  • apps/syndie/java/src/net/i2p/syndie/ArchiveIndexer.java

    r779aa24 rd4a8595  
    159159        }
    160160       
    161         public void receiveAddress(String name, String schema, String location, String anchorText) {}
     161        public void receiveAddress(String name, String schema, String protocol, String location, String anchorText) {}
    162162        public void receiveArchive(String name, String description, String locationSchema, String location, String postingKey, String anchorText) {}
    163163        public void receiveAttachment(int id, String anchorText) {}
  • apps/syndie/java/src/net/i2p/syndie/BlogManager.java

    r779aa24 rd4a8595  
    226226            out = new FileOutputStream(userFile);
    227227            out.write(DataHelper.getUTF8(user.export()));
     228            user.getPetNameDB().store(user.getAddressbookLocation());
    228229        } catch (IOException ioe) {
    229230            ioe.printStackTrace();
     
    400401   
    401402   
    402     public String addAddress(User user, String name, String location, String schema) {
     403    public String addAddress(User user, String name, String protocol, String location, String schema) {
    403404        if (!user.getAuthenticated()) return "Not logged in";
    404405        boolean ok = validateAddressName(name);
     
    409410        // no need to quote user/location further, as they've been sanitized
    410411       
    411         FileOutputStream out = null;
    412         try {
    413             File userHostsFile = new File(user.getAddressbookLocation());
    414             Properties knownHosts = getKnownHosts(user, true);
    415             if (knownHosts.containsKey(name)) return "Name is already in use";
    416        
    417             out = new FileOutputStream(userHostsFile, true);
    418             out.write(DataHelper.getUTF8(name + "=" + location + '\n'));
    419             return "Address " + name + " written to your hosts file (" + userHostsFile.getName() + ")";
    420         } catch (IOException ioe) {
    421             return "Error writing out host entry: " + ioe.getMessage();
    422         } finally {
    423             if (out != null) try { out.close(); } catch (IOException ioe) {}
     412        PetNameDB names = user.getPetNameDB();
     413        if (names.exists(name))
     414            return "Name is already in use";
     415        PetName pn = new PetName(name, schema, protocol, location);
     416        names.set(name, pn);
     417       
     418        try {
     419            names.store(user.getAddressbookLocation());
     420            return "Address " + name + " written to your addressbook";
     421        } catch (IOException ioe) {
     422            return "Error writing out the name: " + ioe.getMessage();
    424423        }
    425424    }
     
    456455    private boolean validateAddressLocation(String location) {
    457456        if ( (location == null) || (location.trim().length() <= 0) ) return false;
    458         try {
    459             Destination d = new Destination(location);
    460             return (d.getPublicKey() != null);
    461         } catch (DataFormatException dfe) {
    462             dfe.printStackTrace();
    463             return false;
     457        if (false) {
     458            try {
     459                Destination d = new Destination(location);
     460                return (d.getPublicKey() != null);
     461            } catch (DataFormatException dfe) {
     462                dfe.printStackTrace();
     463                return false;
     464            }
     465        } else {
     466            // not everything is an i2p destination...
     467            return true;
    464468        }
    465469    }
  • apps/syndie/java/src/net/i2p/syndie/User.java

    r779aa24 rd4a8595  
    22
    33import java.io.UnsupportedEncodingException;
     4import java.io.IOException;
    45import java.util.*;
    56import net.i2p.I2PAppContext;
     
    3738    private String _torProxyHost;
    3839    private int _torProxyPort;
     40    private PetNameDB _petnames;
    3941   
    4042    public User() {
     
    6365        _lastLogin = -1;
    6466        _lastMetaEntry = 0;
     67        _petnames = new PetNameDB();
    6568    }
    6669   
     
    9295    public String getTorProxyHost() { return _torProxyHost; }
    9396    public int getTorProxyPort() { return _torProxyPort; }
     97   
     98    public PetNameDB getPetNameDB() { return _petnames; }
    9499   
    95100    public void invalidate() {
     
    157162       
    158163        String addr = props.getProperty("addressbook", "userhosts.txt");
    159         if (addr != null)
     164        if (addr != null) {
    160165            _addressbookLocation = addr;
     166            try {
     167                _petnames.load(addr);
     168            } catch (IOException ioe) {
     169                ioe.printStackTrace();
     170            }
     171        }
    161172       
    162173        String show = props.getProperty("showimages", "false");
  • apps/syndie/java/src/net/i2p/syndie/sml/EventReceiverImpl.java

    r779aa24 rd4a8595  
    2626        System.out.println("Receive image [" + alternateText + "]/[" + attachmentId + "]");
    2727    }
    28     public void receiveAddress(String name, String schema, String location, String anchorText) {
     28    public void receiveAddress(String name, String schema, String protocol, String location, String anchorText) {
    2929        System.out.println("Receive address [" + name + "]/[" + schema + "]/[" + location + "]/[" + anchorText+ "]");
    3030    }
  • apps/syndie/java/src/net/i2p/syndie/sml/HTMLPreviewRenderer.java

    r779aa24 rd4a8595  
    9595            for (int i = 0; i < _addresses.size(); i++) {
    9696                Address a = (Address)_addresses.get(i);
    97                 _postBodyBuffer.append("<a href=\"addaddress.jsp?schema=");
    98                 _postBodyBuffer.append(sanitizeURL(a.schema)).append("&location=");
    99                 _postBodyBuffer.append(sanitizeURL(a.location)).append("&name=");
    100                 _postBodyBuffer.append(sanitizeURL(a.name));
    101                 _postBodyBuffer.append("\">").append(sanitizeString(a.name));
     97               
     98                String knownName = null;
     99                if (_user != null)
     100                    knownName = _user.getPetNameDB().getNameByLocation(a.location);
     101                if (knownName != null) {
     102                    _postBodyBuffer.append(' ').append(sanitizeString(knownName));
     103                } else {
     104                    _postBodyBuffer.append(" <a href=\"addaddress.jsp?schema=");
     105                    _postBodyBuffer.append(sanitizeURL(a.schema)).append("&location=");
     106                    _postBodyBuffer.append(sanitizeURL(a.location)).append("&name=");
     107                    _postBodyBuffer.append(sanitizeURL(a.protocol)).append("&protocol=");
     108                    _postBodyBuffer.append(sanitizeURL(a.name));
     109                    _postBodyBuffer.append("\">").append(sanitizeString(a.name));
     110                }
    102111            }
    103112            _postBodyBuffer.append("<br />\n");
  • apps/syndie/java/src/net/i2p/syndie/sml/HTMLRenderer.java

    r779aa24 rd4a8595  
    388388        public String schema;
    389389        public String location;
     390        public String protocol;
    390391        public int hashCode() { return -1; }
    391392        public boolean equals(Object o) {
    392393            Address a = (Address)o;
    393             return DataHelper.eq(schema, a.schema) && DataHelper.eq(location, a.location) && DataHelper.eq(name, a.name);
    394         }
    395     }
    396     public void receiveAddress(String name, String schema, String location, String anchorText) {
     394            return DataHelper.eq(schema, a.schema) && DataHelper.eq(location, a.location) && DataHelper.eq(protocol, a.protocol) && DataHelper.eq(name, a.name);
     395        }
     396    }
     397    public void receiveAddress(String name, String schema, String protocol, String location, String anchorText) {
    397398        Address a = new Address();
    398399        a.name = name;
    399400        a.schema = schema;
    400401        a.location = location;
     402        a.protocol = protocol;
    401403        if (!_addresses.contains(a))
    402404            _addresses.add(a);
    403405        if (!continueBody()) { return; }
    404406        if ( (schema == null) || (location == null) ) return;
    405         _bodyBuffer.append("<a href=\"addaddress.jsp?schema=");
    406         _bodyBuffer.append(sanitizeURL(schema)).append("&name=");
    407         _bodyBuffer.append(sanitizeURL(name)).append("&location=");
    408         _bodyBuffer.append(sanitizeURL(location)).append("\">").append(sanitizeString(anchorText)).append("</a>");
     407        String knownName = null;
     408        if (_user != null)
     409            knownName = _user.getPetNameDB().getNameByLocation(location);
     410        if (knownName != null) {
     411            _bodyBuffer.append(sanitizeString(anchorText));
     412            _bodyBuffer.append(" <i>(").append(sanitizeString(knownName)).append(")</i>");
     413        } else {
     414            System.err.println("Receiving address [" + location + "]");
     415            _bodyBuffer.append("<a href=\"addaddress.jsp?schema=");
     416            _bodyBuffer.append(sanitizeURL(schema)).append("&name=");
     417            _bodyBuffer.append(sanitizeURL(name)).append("&protocol=");
     418            _bodyBuffer.append(sanitizeURL(protocol)).append("&location=");
     419            _bodyBuffer.append(sanitizeURL(location)).append("\">").append(sanitizeString(anchorText)).append("</a>");
     420        }
    409421    }
    410422   
     
    541553                for (int i = 0; i < _addresses.size(); i++) {
    542554                    Address a = (Address)_addresses.get(i);
    543                     _postBodyBuffer.append(" <a href=\"addaddress.jsp?schema=");
    544                     _postBodyBuffer.append(sanitizeURL(a.schema)).append("&location=");
    545                     _postBodyBuffer.append(sanitizeURL(a.location)).append("&name=");
    546                     _postBodyBuffer.append(sanitizeURL(a.name));
    547                     _postBodyBuffer.append("\">").append(sanitizeString(a.name));
     555                   
     556                    String knownName = null;
     557                    if (_user != null)
     558                        knownName = _user.getPetNameDB().getNameByLocation(a.location);
     559                    if (knownName != null) {
     560                        _postBodyBuffer.append(' ').append(sanitizeString(knownName));
     561                    } else {
     562                        _postBodyBuffer.append(" <a href=\"addaddress.jsp?schema=");
     563                        _postBodyBuffer.append(sanitizeURL(a.schema)).append("&location=");
     564                        _postBodyBuffer.append(sanitizeURL(a.location)).append("&name=");
     565                        _postBodyBuffer.append(sanitizeURL(a.name)).append("&protocol=");
     566                        _postBodyBuffer.append(sanitizeURL(a.protocol));
     567                        _postBodyBuffer.append("\">").append(sanitizeString(a.name));
     568                    }
    548569                }
    549570                _postBodyBuffer.append("<br />\n");
     
    633654            _preBodyBuffer.append("<form action=\"index.jsp\">");
    634655        _preBodyBuffer.append("<td nowrap=\"true\" align=\"right\" valign=\"top\" class=\"syndieEntryMetaCell\">\n");
     656       
     657        String knownName = null;
     658        if ( (_entry != null) && (_user != null) )
     659            knownName = _user.getPetNameDB().getNameByLocation(_entry.getURI().getKeyHash().toBase64());
     660        //if (knownName != null)
     661        //    _preBodyBuffer.append("Pet name: ").append(sanitizeString(knownName)).append(" ");
     662
    635663        BlogInfo info = null;
    636664        if (_entry != null)
     
    638666        if (info != null) {
    639667            _preBodyBuffer.append("<a href=\"").append(getMetadataURL()).append("\">");
    640             String nameStr = info.getProperty("Name");
    641             if (nameStr == null)
    642                 _preBodyBuffer.append("[no name]");
    643             else
    644                 _preBodyBuffer.append(sanitizeString(nameStr));
     668            if (knownName != null) {
     669                _preBodyBuffer.append(sanitizeString(knownName));
     670            } else {
     671                String nameStr = info.getProperty("Name");
     672                if (nameStr == null)
     673                    _preBodyBuffer.append("[no name]");
     674                else
     675                    _preBodyBuffer.append(sanitizeString(nameStr));
     676            }
    645677            _preBodyBuffer.append("</a>");
    646678        } else {
    647679            _preBodyBuffer.append("[unknown blog]");
    648680        }
     681
     682       
     683        if ( (_user != null) && (_user.getAuthenticated()) && (_entry != null) ) {
     684            PetName pn = _user.getPetNameDB().get(knownName);
     685            if ( (pn == null) || (!pn.isMember("Favorites")) )
     686                _preBodyBuffer.append(" <input type=\"submit\" name=\"action\" value=\"Bookmark blog\" />");
     687            if ( (pn == null) || (!pn.isMember("Ignore")) )
     688                _preBodyBuffer.append(" <input type=\"submit\" name=\"action\" value=\"Ignore blog\" />");
     689            else
     690                _preBodyBuffer.append(" <input type=\"submit\" name=\"action\" value=\"Unignore blog\" />");
     691            _preBodyBuffer.append(" <input type=\"hidden\" name=\"blog\" value=\"").append(_entry.getURI().getKeyHash().toBase64()).append("\" />");
     692            if (info != null)
     693                _preBodyBuffer.append(" <input type=\"hidden\" name=\"name\" value=\"").append(sanitizeTagParam(info.getProperty("Name"))).append("\" />");
     694        }
     695
     696       
    649697        if ( (tags != null) && (tags.length > 0) ) {
    650698            _preBodyBuffer.append(" Tags: ");
     
    681729        else
    682730            _preBodyBuffer.append(getEntryDate(new Date().getTime()));
    683         if ( (_user != null) && (_user.getAuthenticated()) )
     731        if ( (_user != null) && (_user.getAuthenticated()) ) {
    684732            _preBodyBuffer.append(" <a href=\"").append(getPostURL(_user.getBlog(), true)).append("\">Reply</a>\n");
     733        }
    685734        _preBodyBuffer.append("\n</td>");
    686735        if ( (tags != null) && (tags.length > 0) )
     
    695744                String str = _dateFormat.format(new Date(when));
    696745                long dayBegin = _dateFormat.parse(str).getTime();
    697                 return str + "." + (when - dayBegin);
     746                return str + " [" + (when - dayBegin) + "]";
    698747            } catch (ParseException pe) {
    699748                pe.printStackTrace();
  • apps/syndie/java/src/net/i2p/syndie/sml/SMLParser.java

    r779aa24 rd4a8595  
    212212    private static final String P_ADDRESS_LOCATION = "location";
    213213    private static final String P_ADDRESS_SCHEMA = "schema";
     214    private static final String P_ADDRESS_PROTOCOL = "proto";
    214215    private static final String P_ATTACHMENT_ID = "id";
    215216    private static final String P_ARCHIVE_NAME = "name";
     
    255256            receiver.receiveLink(getString(P_LINK_SCHEMA, attr), getString(P_LINK_LOCATION, attr), body);
    256257        } else if (T_ADDRESS.equals(tagName)) {
    257             receiver.receiveAddress(getString(P_ADDRESS_NAME, attr), getString(P_ADDRESS_SCHEMA, attr), getString(P_ADDRESS_LOCATION, attr), body);
     258            receiver.receiveAddress(getString(P_ADDRESS_NAME, attr), getString(P_ADDRESS_SCHEMA, attr), getString(P_ADDRESS_PROTOCOL, attr), getString(P_ADDRESS_LOCATION, attr), body);
    258259        } else if (T_H1.equals(tagName)) {
    259260            receiver.receiveH1(body);
     
    382383                                   String postingKey, String anchorText);
    383384        public void receiveImage(String alternateText, int attachmentId);
    384         public void receiveAddress(String name, String schema, String location, String anchorText);
     385        public void receiveAddress(String name, String schema, String protocol, String location, String anchorText);
    385386        public void receiveAttachment(int id, String anchorText);
    386387        public void receiveBold(String text);
  • apps/syndie/java/src/net/i2p/syndie/web/ArchiveViewerBean.java

    r779aa24 rd4a8595  
    103103        out.write("\">All posts from all blogs</option>\n");
    104104       
    105         Map groups = null;
     105        List groups = null;
    106106        if (user != null)
    107             groups = user.getBlogGroups();
     107            groups = user.getPetNameDB().getGroups();
    108108        if (groups != null) {
    109             for (Iterator iter = groups.keySet().iterator(); iter.hasNext(); ) {
    110                 String name = (String)iter.next();
     109            for (int i = 0; i < groups.size(); i++) {
     110                String name = (String)groups.get(i);
    111111                out.write("<option value=\"group://" + Base64.encode(DataHelper.getUTF8(name)) + "\">" +
    112112                          "Group: " + HTMLRenderer.sanitizeString(name) + "</option>\n");
     
    227227        String tag = getString(parameters, PARAM_TAG);
    228228        if (tag != null) tag = DataHelper.getUTF8(Base64.decode(tag));
     229       
    229230        long entryId = -1;
    230231        if (blogStr != null) {
     
    238239       
    239240        String sel = getString(parameters, PARAM_SELECTOR);
     241       
     242        if (getString(parameters, "action") != null) {
     243            tag = null;
     244            blog = null;
     245            sel = null;
     246            group = null;
     247        }
     248       
    240249        if ( (sel == null) && (blog == null) && (group == null) && (tag == null) )
    241250            sel = getDefaultSelector(user, parameters);
     
    454463                        index.selectMatchesOrderByEntryId(rv, s.blog, s.tag);
    455464                }
     465            }
     466            PetNameDB db = user.getPetNameDB();
     467            for (Iterator iter = db.getNames().iterator(); iter.hasNext(); ) {
     468                String name = (String)iter.next();
     469                PetName pn = db.get(name);
     470                if ("syndie".equals(pn.getNetwork()) && "syndieblog".equals(pn.getProtocol()) && pn.isMember(group)) {
     471                    byte pnLoc[] = Base64.decode(pn.getLocation());
     472                    if (pnLoc != null) {
     473                        Hash pnHash = new Hash(pnLoc);
     474                        index.selectMatchesOrderByEntryId(rv, pnHash, null);
     475                    }
     476                }
     477            }
     478            if (rv.size() > 0)
    456479                return rv;
    457             }
    458480        }
    459481        index.selectMatchesOrderByEntryId(rv, blog, tag);
     482        filterIgnored(user, rv);
    460483        return rv;
     484    }
     485   
     486    private static void filterIgnored(User user, List uris) {
     487        for (int i = 0; i < uris.size(); i++) {
     488            BlogURI uri = (BlogURI)uris.get(i);
     489            Hash k = uri.getKeyHash();
     490            if (k == null) continue;
     491            String pname = user.getPetNameDB().getNameByLocation(k.toBase64());
     492            if (pname != null) {
     493                PetName pn = user.getPetNameDB().get(pname);
     494                if ( (pn != null) && (pn.isMember("Ignore")) ) {
     495                    uris.remove(i);
     496                    i--;
     497                }
     498            }
     499        }
    461500    }
    462501   
  • apps/syndie/jsp/_bodyindex.jsp

    r779aa24 rd4a8595  
    11<%@page contentType="text/html; charset=UTF-8" import="net.i2p.syndie.web.ArchiveViewerBean, net.i2p.syndie.*" %>
    22<% request.setCharacterEncoding("UTF-8"); %>
    3 <jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" /><table border="0" width="100%">
     3<jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" /><%
     4if (user.getAuthenticated() && (null != request.getParameter("action")) ) {
     5  %><!-- <%=request.getParameterMap()%> --><%
     6  String blog = request.getParameter("blog");
     7  String group = null;
     8  if (request.getParameter("action").equals("Bookmark blog"))
     9    group = "Favorites";
     10  else if (request.getParameter("action").equals("Ignore blog"))
     11    group = "Ignore";
     12  boolean unignore = ("Unignore blog".equals(request.getParameter("action")));
     13
     14  String name = user.getPetNameDB().getNameByLocation(blog);
     15  if (name == null)
     16    name = request.getParameter("name");
     17  if (name == null)
     18    name = blog;
     19  if ( (name != null) && (blog != null) && ( (group != null) || (unignore) ) ) {
     20    PetName pn = user.getPetNameDB().get(name);
     21    if (pn != null) {
     22      if (unignore)
     23        pn.removeGroup("Ignore");
     24      else
     25        pn.addGroup(group);
     26    } else {
     27      pn = new PetName(name, "syndie", "syndieblog", blog);
     28      pn.addGroup(group);
     29      user.getPetNameDB().set(name, pn);
     30    }
     31    BlogManager.instance().saveUser(user);
     32  }
     33}
     34%><table border="0" width="100%">
    435<tr><form action="index.jsp"><td nowrap="true">
    536<b>Blogs:</b> <%ArchiveViewerBean.renderBlogSelector(user, request.getParameterMap(), out);%>
  • apps/syndie/jsp/_topnav.jsp

    r779aa24 rd4a8595  
    2525<a href="<%=HTMLRenderer.getPostURL(user.getBlog())%>">Post</a>
    2626<a href="<%=HTMLRenderer.getMetadataURL(user.getBlog())%>">Metadata</a>
     27<a href="addresses.jsp">Addressbook</a>
    2728<a href="index.jsp?logout=true">Logout</a><br />
    2829<%} else {%>
  • apps/syndie/jsp/addaddress.jsp

    r779aa24 rd4a8595  
    1515<tr><td valign="top" align="left" colspan="3"><%
    1616String nameStr = request.getParameter("name");
     17String protoStr = request.getParameter("proto");
    1718String locStr = request.getParameter("location");
    1819String schemaStr = request.getParameter("schema");
    1920String name = null;
     21String proto = null;
    2022String location = null;
    2123String schema = null;
    2224try {
    2325    name = DataHelper.getUTF8(Base64.decode(nameStr));
     26    if ( (protoStr != null) && (protoStr.trim().length() > 0) )
     27      proto = DataHelper.getUTF8(Base64.decode(protoStr));
    2428    location = DataHelper.getUTF8(Base64.decode(locStr));
    2529    schema = DataHelper.getUTF8(Base64.decode(schemaStr));
     
    3135  out.write("<b>No location specified</b>");
    3236} else if (user.getAuthenticated() && ("Add".equals(request.getParameter("action"))) ) {
    33   out.write("<b>" + BlogManager.instance().addAddress(user, name, location, schema) + "</b>");
     37  out.write("<b>" + BlogManager.instance().addAddress(user, name, proto, location, schema) + "</b>");
    3438} else { %>Are you sure you really want to add the
    3539addressbook mapping of <%=HTMLRenderer.sanitizeString(name)%> to
  • history.txt

    r779aa24 rd4a8595  
    1 $Id: history.txt,v 1.236 2005/09/02 13:34:14 jrandom Exp $
     1$Id: history.txt,v 1.237 2005/09/02 14:10:05 jrandom Exp $
     2
     32005-09-04  jrandom
     4    * Don't persist peer profiles until we are shutting down, as the
     5      persistence process gobbles RAM and wall time.
     6    * Bugfix to allow you to check/uncheck the sharedClient setting on the
     7      I2PTunnel web interface.
     8    * Be more careful when expiring a failed tunnel message fragment so we
     9      don't drop the data while attempting to read it.
    210
    311* 2005-09-02  0.6.0.5 released
  • router/java/src/net/i2p/router/RouterVersion.java

    r779aa24 rd4a8595  
    1616 */
    1717public class RouterVersion {
    18     public final static String ID = "$Revision: 1.225 $ $Date: 2005/09/02 13:34:15 $";
     18    public final static String ID = "$Revision: 1.226 $ $Date: 2005/09/02 14:10:06 $";
    1919    public final static String VERSION = "0.6.0.5";
    20     public final static long BUILD = 0;
     20    public final static long BUILD = 1;
    2121    public static void main(String args[]) {
    2222        System.out.println("I2P Router version: " + VERSION);
  • router/java/src/net/i2p/router/peermanager/PeerManager.java

    r779aa24 rd4a8595  
    4040        loadProfiles();
    4141        _context.jobQueue().addJob(new EvaluateProfilesJob(_context));
    42         _context.jobQueue().addJob(new PersistProfilesJob(_context, this));
     42        //_context.jobQueue().addJob(new PersistProfilesJob(_context, this));
    4343    }
    4444   
  • router/java/src/net/i2p/router/transport/udp/PeerTestManager.java

    r779aa24 rd4a8595  
    409409        }
    410410       
    411         if (charlie == null) {
     411        if ( (charlie == null) || (charlieInfo == null) ) {
    412412            if (_log.shouldLog(Log.WARN))
    413413                _log.warn("Unable to pick a charlie");
  • router/java/src/net/i2p/router/tunnel/FragmentHandler.java

    r779aa24 rd4a8595  
    354354        try {
    355355            byte data[] = msg.toByteArray();
     356            if (msg == null)
     357                return;
    356358            if (_log.shouldLog(Log.DEBUG))
    357359                _log.debug("RECV(" + data.length + "): " + Base64.encode(data) 
  • router/java/src/net/i2p/router/tunnel/FragmentedMessage.java

    r779aa24 rd4a8595  
    215215    }
    216216    public byte[] toByteArray() {
    217         byte rv[] = new byte[getCompleteSize()];
    218         writeComplete(rv, 0);
    219         releaseFragments();
    220         return rv;
     217        synchronized (this) {
     218            if (_releasedAfter > 0) return null;
     219            byte rv[] = new byte[getCompleteSize()];
     220            writeComplete(rv, 0);
     221            releaseFragments();
     222            return rv;
     223        }
    221224    }
    222225   
    223226    public long getReleasedAfter() { return _releasedAfter; }
    224227    public void failed() {
    225         releaseFragments();
     228        synchronized (this) {
     229            releaseFragments();
     230        }
    226231    }
    227232
Note: See TracChangeset for help on using the changeset viewer.