2005-11-30 jrandom

* Don't let the TCP transport alone shitlist a peer, since other
      transports may be working.  Also display whether TCP connections are
      inbound or outbound on the peers page.
    * Fixed some substantial bugs in the SSU introducers where we wouldn't
      talk to anyone who didn't expose an IP (even if they had introducers),
      among other goofy things.
    * When dealing with SSU introducers, send them all a packet at 3s/6s/9s,
      rather than sending one a packet at 3s, then another a packet at 6s,
      and a third a packet at 9s.
    * Fixed Syndie attachments (oops)
This commit is contained in:
jrandom
2005-11-30 20:48:25 +00:00
committed by zzz
parent 3d18bf870b
commit f62a6d3ce6
15 changed files with 133 additions and 46 deletions

View File

@ -172,6 +172,7 @@ public class PostBean {
private static final int MAX_SIZE = 256*1024;
private void cacheAttachments() throws IOException {
if (_user == null) throw new IOException("User not specified");
File postCacheDir = new File(BlogManager.instance().getTempDir(), _user.getBlog().toBase64());
if (!postCacheDir.exists())
postCacheDir.mkdirs();

View File

@ -49,6 +49,8 @@ public class PostServlet extends BaseServlet {
String action = req.getParameter(PARAM_ACTION);
if (!empty(action) && ACTION_CONFIRM.equals(action)) {
postEntry(user, req, archive, post, out);
post.reinitialize();
post.setUser(user);
} else {
String contentType = req.getContentType();
if (!empty(contentType) && (contentType.indexOf("boundary=") != -1)) {
@ -73,8 +75,8 @@ public class PostServlet extends BaseServlet {
out.write("<tr><td colspan=\"3\">");
post.reinitialize();
post.setUser(user);
//post.reinitialize();
//post.setUser(user);
boolean inNewThread = getInNewThread(req.getString(PARAM_IN_NEW_THREAD));
boolean refuseReplies = getRefuseReplies(req.getString(PARAM_REFUSE_REPLIES));
@ -343,6 +345,7 @@ public class PostServlet extends BaseServlet {
bean = new PostBean();
req.getSession().setAttribute(ATTR_POST_BEAN, bean);
}
bean.setUser(user);
return bean;
}