@@ -438,7 +438,7 @@ public void handleASAPInterest(ASAP_Interest_PDU_1_0 asapInterest, ASAP_1_0 prot
438438 System .out .println (b .toString ());
439439 //>>>>>>>>>>>>>>>>>>>debug
440440
441- this .sendChunks (peer , this .getChunkStorage (), protocol , workingEra , lastEra , os );
441+ this .sendChunks (this . owner , peer , this .getChunkStorage (), protocol , workingEra , lastEra , os );
442442 //<<<<<<<<<<<<<<<<<<debug
443443 b = new StringBuilder ();
444444 b .append (this .getLogStart ());
@@ -453,7 +453,7 @@ public void handleASAPInterest(ASAP_Interest_PDU_1_0 asapInterest, ASAP_1_0 prot
453453 System .out .println (this .getLogStart () + "send chunks received from: " + sender );
454454 ASAPChunkStorage incomingChunkStorage = this .getIncomingChunkStorage (sender );
455455
456- this .sendChunks (peer , incomingChunkStorage , protocol , workingEra , lastEra , os );
456+ this .sendChunks (sender , peer , incomingChunkStorage , protocol , workingEra , lastEra , os );
457457 }
458458 }
459459 }
@@ -467,7 +467,7 @@ public void setSendReceivedChunks(boolean on) throws IOException {
467467 this .saveStatus ();
468468 }
469469
470- private void sendChunks (String peer , ASAPChunkStorage chunkStorage ,
470+ private void sendChunks (CharSequence sender , String recipient , ASAPChunkStorage chunkStorage ,
471471 ASAP_1_0 protocol , int workingEra ,
472472 int lastEra , OutputStream os ) throws IOException , ASAPException {
473473 /*
@@ -509,7 +509,7 @@ private void sendChunks(String peer, ASAPChunkStorage chunkStorage,
509509 if (!this .isPublic (chunk )) {
510510 List <CharSequence > recipients = chunk .getRecipients ();
511511
512- if (!recipients .contains (peer )) {
512+ if (!recipients .contains (recipient )) {
513513 continue ;
514514 }
515515 }
@@ -522,13 +522,13 @@ private void sendChunks(String peer, ASAPChunkStorage chunkStorage,
522522 //>>>>>>>>>>>>>>>>>>>debug
523523
524524 /*
525- void assimilate(CharSequence peer , CharSequence recipientPeer, CharSequence format, CharSequence channel, int era,
525+ void assimilate(CharSequence recipient , CharSequence recipientPeer, CharSequence format, CharSequence channel, int era,
526526 int length, List<Integer> offsets, InputStream dataIS, OutputStream os, boolean signed)
527527 throws IOException, ASAPException;
528528 */
529529
530- protocol .assimilate (this . owner , // peer
531- peer , // recipient
530+ protocol .assimilate (sender , // recipient
531+ recipient , // recipient
532532 this .format ,
533533 chunk .getUri (), // channel ok
534534 workingEra , // era ok
@@ -539,12 +539,12 @@ void assimilate(CharSequence peer, CharSequence recipientPeer, CharSequence form
539539 false );
540540
541541 // remember sent
542- chunk .deliveredTo (peer );
542+ chunk .deliveredTo (recipient );
543543 //<<<<<<<<<<<<<<<<<<debug
544544 b = new StringBuilder ();
545545 b .append (this .getLogStart ());
546546 b .append ("remembered delivered to " );
547- b .append (peer );
547+ b .append (recipient );
548548 System .out .println (b .toString ());
549549 //>>>>>>>>>>>>>>>>>>>debug
550550 // sent to all recipients
@@ -567,7 +567,7 @@ void assimilate(CharSequence peer, CharSequence recipientPeer, CharSequence form
567567 }
568568
569569 // remember that we are in sync until that era
570- this .setLastSeen (peer , workingEra );
570+ this .setLastSeen (recipient , workingEra );
571571
572572 // make a breakpoint here
573573 if (this .memento != null ) this .memento .save (this );
0 commit comments