[Beepcore-java-commits] CVS: beepcore-java/src/org/beepcore/beep/profile/sasl/otp OTPAuthenticator.j
Status: Beta
Brought to you by:
huston
|
From: Huston F. <hu...@us...> - 2001-07-30 13:07:17
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/otp
In directory usw-pr-cvs1:/tmp/cvs-serv8402/otp
Modified Files:
OTPAuthenticator.java
Log Message:
Changed to use new sendXXX methods on Message instead of the methods on Channel
Index: OTPAuthenticator.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/otp/OTPAuthenticator.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** OTPAuthenticator.java 2001/05/23 16:39:36 1.6
--- OTPAuthenticator.java 2001/07/30 13:07:11 1.7
***************
*** 519,523 ****
try {
channel.sendMSG(new StringDataStream(blob.toString()), (ReplyListener) this);
! } catch (Exception x) {
abort(x.getMessage());
}
--- 519,523 ----
try {
channel.sendMSG(new StringDataStream(blob.toString()), (ReplyListener) this);
! } catch (BEEPException x) {
abort(x.getMessage());
}
***************
*** 609,613 ****
{
blob = new Blob(Blob.STATUS_CONTINUE, phrase);
! profile.sendMessage(blob, channel);
}
catch(BEEPException x)
--- 609,613 ----
{
blob = new Blob(Blob.STATUS_CONTINUE, phrase);
! channel.sendMSG(new StringDataStream(blob.toString()), this);
}
catch(BEEPException x)
***************
*** 714,719 ****
if (state == STATE_STARTED) {
! profile.sendReply(receiveIDs(data),
! channel);
return;
}
--- 714,723 ----
if (state == STATE_STARTED) {
! Blob reply = receiveIDs(data);
! try {
! message.sendRPY(new StringDataStream(reply.toString()));
! } catch (BEEPException x) {
! throw new SASLException(x.getMessage());
! }
return;
}
***************
*** 733,737 ****
try
{
! channel.sendRPY(new StringDataStream(new Blob(Blob.STATUS_COMPLETE).toString()));
channel.setDataListener(null);
}
--- 737,741 ----
try
{
! message.sendRPY(new StringDataStream(new Blob(Blob.STATUS_COMPLETE).toString()));
channel.setDataListener(null);
}
***************
*** 754,759 ****
profile.failListenerAuthentication(channel.getSession(),
authenticated);
! channel.sendRPY(new StringDataStream(new Blob(Blob.STATUS_ABORT,
! s.getMessage()).toString()));
// channel.setDataListener(null);
}
--- 758,763 ----
profile.failListenerAuthentication(channel.getSession(),
authenticated);
! Blob reply = new Blob(Blob.STATUS_ABORT, s.getMessage());
! message.sendRPY(new StringDataStream(reply.toString()));
// channel.setDataListener(null);
}
***************
*** 857,865 ****
try
{
! profile.sendMessage(new Blob(Blob.STATUS_ABORT,
! x.getMessage()),
! channel);
}
! catch(SASLException y)
{
message.getChannel().getSession().terminate(y.getMessage());
--- 861,869 ----
try
{
! Blob a = new Blob(Blob.STATUS_ABORT, x.getMessage());
! channel.sendMSG(new StringDataStream(a.toString()),
! this);
}
! catch(BEEPException y)
{
message.getChannel().getSession().terminate(y.getMessage());
|