SAM: Fix v3 LS publish, broken in -4 (ticket #1390)

- code cleanup in direction handling
This commit is contained in:
zzz
2014-09-30 12:17:56 +00:00
parent 49eeb99d43
commit a50afeb5d5
4 changed files with 18 additions and 7 deletions

View File

@@ -280,14 +280,14 @@ class SAMv1Handler extends SAMHandler implements SAMRawReceiver, SAMDatagramRece
if (_log.shouldLog(Log.DEBUG))
_log.debug("No DIRECTION parameter in STREAM session, defaulting to BOTH");
dir = "BOTH";
}
if (!dir.equals("CREATE") && !dir.equals("RECEIVE")
&& !dir.equals("BOTH")) {
} else if (!dir.equals("CREATE") && !dir.equals("RECEIVE")
&& !dir.equals("BOTH")) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Unknown DIRECTION parameter value: [" + dir + "]");
return writeString("SESSION STATUS RESULT=I2P_ERROR MESSAGE=\"Unknown DIRECTION parameter\"\n");
} else {
props.remove("DIRECTION");
}
props.remove("DIRECTION");
streamSession = newSAMStreamSession(destKeystream, dir,props);
} else {

View File

@@ -48,7 +48,7 @@ class SAMv3StreamSession extends SAMStreamSession implements SAMv3Handler.Sessi
return nick ;
}
/**
/**
* Create a new SAM STREAM session, according to information
* registered with the given nickname
*
@@ -61,7 +61,7 @@ class SAMv3StreamSession extends SAMStreamSession implements SAMv3Handler.Sessi
public SAMv3StreamSession(String login)
throws IOException, DataFormatException, SAMException
{
super(getDB().get(login).getDest(), "CREATE",
super(getDB().get(login).getDest(), "BOTH",
getDB().get(login).getProps(),
getDB().get(login).getHandler());
this.nick = login ;

View File

@@ -1,3 +1,14 @@
2014-09-30 zzz
* Logs: Fix displayed filename when empty (ticket #1386)
* SAM: Fix v3 LS publish, broken in -4 (ticket #1390)
2014-09-29 zzz
* CPUID:
- Fix main() model and family calculation
- Add model string fetch from processor
- AMD model string tweaks
* i2psnark: Show subdirectory in table header on details page
2014-09-27 zzz
* CPUID:
- Fix model and family calculations

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 4;
public final static long BUILD = 5;
/** for example "-test" */
public final static String EXTRA = "";