Skip to content

Commit b37c4e5

Browse files
committed
closed channel is created but message exchange still fails.
1 parent 3ee4621 commit b37c4e5

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

src/net/sharksystem/asap/MultiASAPEngineFS_Impl.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,18 @@ public boolean handleASAPManagementPDU(ASAP_PDU_1_0 asapPDU, ASAP_1_0 protocol,
389389

390390
CharSequence channelUri = asapManagementCreateASAPStorageMessage.getChannelUri();
391391
CharSequence format = asapManagementCreateASAPStorageMessage.getAppName();
392-
List<CharSequence> recipients = asapManagementCreateASAPStorageMessage.getRecipients();
392+
List<CharSequence> receivedRecipients = asapManagementCreateASAPStorageMessage.getRecipients();
393+
394+
// add owner to this list
395+
List<CharSequence> recipients = new ArrayList<>();
396+
397+
// add owner
398+
recipients.add(asapPDU.getPeer());
399+
400+
// add rest
401+
for(CharSequence r : receivedRecipients) {
402+
recipients.add(r);
403+
}
393404

394405
b = new StringBuilder();
395406
b.append(this.getLogStart());

test/net/sharksystem/asap/MultihopTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,11 @@ public void createNonOpenStorage() throws IOException, ASAPException, Interrupte
133133
Thread.sleep(1000);
134134

135135
// Bob should now have created an closed asap storage with three recipients
136-
ASAPStorage bobStorage = this.getFreshStorageByName(ui, "Bob:closedChannel");
136+
ASAPStorage bobStorage = this.getFreshStorageByName(ui, "Bob:chat");
137137

138-
List<CharSequence> recipientsList = bobStorage.getRecipients("nonOpen");
138+
ui.doPrintChannelInformation("Bob chat sn2://closedChannel");
139+
140+
List<CharSequence> recipientsList = bobStorage.getRecipients("sn2://closedChannel");
139141
boolean aliceFound = false;
140142
boolean bobFound = false;
141143
boolean claraFound = false;

0 commit comments

Comments
 (0)