Update of /cvsroot/freenet/freenet/src/freenet/node/states/data
In directory sc8-pr-cvs1:/tmp/cvs-serv7199/src/freenet/node/states/data
Modified Files:
SendData.java
Log Message:
Indenting
Index: SendData.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/states/data/SendData.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -w -r1.28 -r1.29
--- SendData.java 21 Oct 2003 01:52:37 -0000 1.28
+++ SendData.java 25 Oct 2003 09:48:57 -0000 1.29
@@ -144,7 +144,8 @@
*/
public State received(Node n, MessageObject mo) throws BadStateException {
boolean isDSI = (mo instanceof DataStateInitiator);
- if(hadDSI) isDSI = false;
+ if (hadDSI)
+ isDSI = false;
boolean isTWCM = (mo == myTWCM);
if(!(isDSI || isTWCM))
throw new BadStateException("expecting DataStateInitiator");
@@ -159,12 +160,9 @@
if(isTWCM) {
waitingForWriteNotify = false;
- if(logDEBUG)
- n.logger.log(this, "Got "+myTWCM+" for "+this,
- Logger.DEBUG);
+ if (logDEBUG) n.logger.log(this, "Got " + myTWCM + " for " +
this, Logger.DEBUG);
if(!myTWCM.finished) {
- n.logger.log(this, "Got a TWCM that was not finished!: "+
- myTWCM+" for "+this, Logger.ERROR);
+ n.logger.log(this, "Got a TWCM that was not finished!:
" + myTWCM + " for " + this, Logger.ERROR);
return this;
}
if(!myTWCM.success) {
@@ -185,7 +183,8 @@
if(!inPaddingMode) {
try {
bufferEndPtr = doRead();
- if(bufferEndPtr == -1) throw new IOException("read failed: "+this);
+ if (bufferEndPtr == -1)
+ throw new IOException("read failed: " + this);
} catch (Throwable t) {
return handleThrowable(t, false); // will do termination and failure
code
}
@@ -356,36 +355,30 @@
}
protected State finish() {
- if(!(moved == length || (inPaddingMode && sentPadding >= paddingLength)
- || (result != -1 && !inPaddingMode))) {
- n.logger.log(this, "Not finishing because moved="+moved+"/"+length+
- ", inPaddingMode="+inPaddingMode+", sentPadding="+
- sentPadding+"/"+paddingLength+" ("+this+")",
- Logger.DEBUG);
+ if (!(moved == length || (inPaddingMode && sentPadding >=
paddingLength) || (result != -1 && !inPaddingMode))) {
+ n.logger.log(this, "Not finishing because moved=" + moved +
"/" + length + ", inPaddingMode=" + inPaddingMode + ", sentPadding=" + sentPadding +
"/" + paddingLength + " (" + this +")", Logger.DEBUG);
return this;
}
if(inPaddingMode && sentPadding > paddingLength)
- n.logger.log(this, "sentPadding="+sentPadding+"/"+
- paddingLength+" ("+this+")",
- Logger.NORMAL);
+ n.logger.log(this, "sentPadding=" + sentPadding + "/" +
paddingLength + " (" + this +")", Logger.NORMAL);
if(result != -1) {
// We were aborted
return handleThrowable(null, false);
}
- if(send != null) send.close();
+ if (send != null)
+ send.close();
closedSend = true;
try {
in.close();
closedIn = true;
} catch (IOException e) {
- Core.logger.log(this, "Caught "+e+" closing input (successful): "+this,
- Logger.NORMAL);
+ Core.logger.log(this, "Caught " + e + " closing input
(successful): " + this, Logger.NORMAL);
}
- if(moved == length) result = Presentation.CB_OK;
- n.diagnostics.occurrenceBinomial("sentData", 1,
- result == Presentation.CB_OK ?
- 1 : 0);
- if(!silent) n.schedule(new DataSent(this));
+ if (moved == length)
+ result = Presentation.CB_OK;
+ n.diagnostics.occurrenceBinomial("sentData", 1, result ==
Presentation.CB_OK ? 1 : 0);
+ if (!silent)
+ n.schedule(new DataSent(this));
return null;
};
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs