Skip to content

Commit 9ae47dc

Browse files
committed
removed any special handling of asap management messages.
1 parent 456d983 commit 9ae47dc

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

src/net/sharksystem/asap/ASAPEngine.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ public void handleConnection(InputStream is, OutputStream os,
290290
public void handleASAPOffer(ASAP_OfferPDU_1_0 asapOffer, ASAP_1_0 protocol, OutputStream os)
291291
throws ASAPException, IOException {
292292

293+
/*
293294
if(this.isASAPManagementMessage(asapOffer)) {
294295
//<<<<<<<<<<<<<<<<<<debug
295296
StringBuilder b = new StringBuilder();
@@ -299,20 +300,22 @@ public void handleASAPOffer(ASAP_OfferPDU_1_0 asapOffer, ASAP_1_0 protocol, Outp
299300
//>>>>>>>>>>>>>>>>>>>debug
300301
return;
301302
} else {
303+
*/
302304
//<<<<<<<<<<<<<<<<<<debug
303305
StringBuilder b = new StringBuilder();
304306
b.append(this.getLogStart());
305-
b.append("ASAP Offer are not processed in this implementation");
307+
b.append("ASAP Offer is not processed in this implementation");
306308
System.out.println(b.toString());
307309
//>>>>>>>>>>>>>>>>>>>debug
308310
return;
309-
}
311+
// }
310312
}
311313

312314
public void handleASAPAssimilate(ASAP_AssimilationPDU_1_0 asapAssimiliationPDU, ASAP_1_0 protocol,
313315
InputStream is, OutputStream os, ASAPChunkReceivedListener listener)
314316
throws ASAPException, IOException {
315317

318+
/*
316319
if(this.isASAPManagementMessage(asapAssimiliationPDU)) {
317320
//<<<<<<<<<<<<<<<<<<debug
318321
StringBuilder b = new StringBuilder();
@@ -322,7 +325,7 @@ public void handleASAPAssimilate(ASAP_AssimilationPDU_1_0 asapAssimiliationPDU,
322325
//>>>>>>>>>>>>>>>>>>>debug
323326
throw new ASAPException("got asap management assimilate - it's the wrong place for that - multiengine should be called");
324327
}
325-
328+
*/
326329
String sender = asapAssimiliationPDU.getPeer();
327330
int eraSender = asapAssimiliationPDU.getEra();
328331

src/net/sharksystem/asap/MultiASAPEngineFS_Impl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,8 @@ public boolean handleASAPManagementPDU(ASAP_PDU_1_0 asapPDU, ASAP_1_0 protocol,
446446
// else - channel does not exist - create by setting recipients
447447
System.out.println(this.getLogStart() + "create channel");
448448
asapStorage.createChannel(channelUri, recipients);
449-
return true;
449+
// return true;
450+
return false;
450451
}
451452

452453
private String getLogStart() {

test/net/sharksystem/asap/MultihopTests.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,16 @@ public void createNonOpenStorage() throws IOException, ASAPException, Interrupte
122122
// wait a moment to give server socket time to be created
123123
Thread.sleep(10);
124124
ui.doCreateASAPMultiEngine("Bob");
125-
126125
ui.doConnect("7070 Bob");
127126

128127
// alice should be in era 1 (content has changed before connection) and bob era is 0 - no changes
129-
130128
// wait a moment
131129
Thread.sleep(1000);
132-
133130
// kill connections
134131
ui.doKill("all");
135-
136132
// alice should stay in era 1 (no content change), bob should be in era 1 received something
137-
138133
// wait a moment
139134
Thread.sleep(1000);
140-
141135
// Bob should now have created an closed asap storage with three recipients
142136
ASAPStorage bobStorage = this.getFreshStorageByName(ui, "Bob:chat");
143137

0 commit comments

Comments
 (0)