Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/anonymous
In directory usw-pr-cvs1:/tmp/cvs-serv8402/anonymous
Modified Files:
AnonymousAuthenticator.java
Log Message:
Changed to use new sendXXX methods on Message instead of the methods on Channel
Index: AnonymousAuthenticator.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/anonymous/AnonymousAuthenticator.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** AnonymousAuthenticator.java 2001/07/03 20:50:26 1.7
--- AnonymousAuthenticator.java 2001/07/30 13:07:11 1.8
***************
*** 211,215 ****
try {
credential.put(SessionCredential.AUTHENTICATOR, authenticateId);
! profile.sendMessage(blob, channel);
} catch (Exception x) {
abort(x.getMessage());
--- 211,215 ----
try {
credential.put(SessionCredential.AUTHENTICATOR, authenticateId);
! channel.sendMSG(new StringDataStream(blob.toString()), this);
} catch (Exception x) {
abort(x.getMessage());
***************
*** 314,324 ****
if (state == STATE_STARTED) {
try {
! profile.sendReply(receiveID(data), channel);
! } catch (Exception szf) {
! abort(szf.getMessage());
// @todo weird and iffy, cuz we may have sent...
// Unsolicited message is probably better than
// a waiting peer, so let's abort and blow it up...
- // return;
}
profile.finishListenerAuthentication(new SessionCredential(credential),
--- 314,324 ----
if (state == STATE_STARTED) {
try {
! Blob reply = receiveID(data);
! message.sendRPY(new StringDataStream(reply.toString()));
! } catch (BEEPException x) {
! abort(x.getMessage());
// @todo weird and iffy, cuz we may have sent...
// Unsolicited message is probably better than
// a waiting peer, so let's abort and blow it up...
}
profile.finishListenerAuthentication(new SessionCredential(credential),
***************
*** 330,337 ****
try
{
! profile.sendReply(new Blob(Blob.STATUS_ABORT, s.getMessage()),
! channel);
}
! catch(Exception t)
{
message.getChannel().getSession().terminate(t.getMessage());
--- 330,337 ----
try
{
! Blob reply = new Blob(Blob.STATUS_ABORT, s.getMessage());
! message.sendRPY(new StringDataStream(reply.toString()));
}
! catch(BEEPException t)
{
message.getChannel().getSession().terminate(t.getMessage());
***************
*** 413,422 ****
this.notify();
}
! try
! {
! if(sendAbort)
! profile.sendMessage(new Blob(Blob.STATUS_ABORT,
! x.getMessage()),
! channel);
}
catch(Exception q)
--- 413,422 ----
this.notify();
}
! try {
! if(sendAbort) {
! Blob reply = new Blob(Blob.STATUS_ABORT, x.getMessage());
! channel.sendMSG(new StringDataStream(blob.toString()),
! this);
! }
}
catch(Exception q)
|