mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-14 06:51:08 +01:00
Add XMPPConnection.sendStanza(Stanza)
and deprecate sendPacket().
This commit is contained in:
parent
183af99ffb
commit
ed4fa3390f
58 changed files with 183 additions and 167 deletions
|
|
@ -173,6 +173,6 @@ public class FileTransferManager extends Manager {
|
|||
// Socks5BytestreamManager.replyRejectPacket(IQ).
|
||||
IQ rejection = IQ.createErrorResponse(initiation, new XMPPError(
|
||||
XMPPError.Condition.forbidden));
|
||||
connection().sendPacket(rejection);
|
||||
connection().sendStanza(rejection);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ public class FileTransferNegotiator extends Manager {
|
|||
String errorMessage = "No stream methods contained in stanza.";
|
||||
XMPPError error = XMPPError.from(XMPPError.Condition.bad_request, errorMessage);
|
||||
IQ iqPacket = IQ.createErrorResponse(si, error);
|
||||
connection().sendPacket(iqPacket);
|
||||
connection().sendStanza(iqPacket);
|
||||
throw new FileTransferException.NoStreamMethodsOfferedException();
|
||||
}
|
||||
|
||||
|
|
@ -203,7 +203,7 @@ public class FileTransferNegotiator extends Manager {
|
|||
}
|
||||
catch (NoAcceptableTransferMechanisms e) {
|
||||
IQ iqPacket = IQ.createErrorResponse(si, XMPPError.from(XMPPError.Condition.bad_request, "No acceptable transfer mechanism"));
|
||||
connection().sendPacket(iqPacket);
|
||||
connection().sendStanza(iqPacket);
|
||||
throw e;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public abstract class StreamNegotiator {
|
|||
streamMethodInitiation = initationSetEvents.performActionAndWaitForEvent(eventKey, connection.getPacketReplyTimeout(), new Callback<NotConnectedException>() {
|
||||
@Override
|
||||
public void action() throws NotConnectedException {
|
||||
connection.sendPacket(response);
|
||||
connection.sendStanza(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue