Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
b4e47ce8
Commit
b4e47ce8
authored
Jul 27, 2015
by
JonnyHeavey
Committed by
Dave Cridland
Jul 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor adjustments following review
parent
ea56ccdd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
14 deletions
+7
-14
LocalSession.java
src/java/org/jivesoftware/openfire/session/LocalSession.java
+2
-2
StreamManager.java
...jivesoftware/openfire/streammanagement/StreamManager.java
+5
-12
No files found.
src/java/org/jivesoftware/openfire/session/LocalSession.java
View file @
b4e47ce8
...
...
@@ -98,7 +98,7 @@ public abstract class LocalSession implements Session {
/**
* XEP-0198 Stream Manager
*/
protected
StreamManager
streamManager
=
null
;
protected
final
StreamManager
streamManager
;
/**
* Creates a session with an underlying connection and permission protection.
...
...
@@ -432,7 +432,7 @@ public abstract class LocalSession implements Session {
/**
* Enables stream management for session
* @param enable XEP-0198 <enable/>
stanza
* @param enable XEP-0198 <enable/>
element
*/
public
void
enableStreamMangement
(
Element
enable
)
{
...
...
src/java/org/jivesoftware/openfire/streammanagement/StreamManager.java
View file @
b4e47ce8
...
...
@@ -6,6 +6,7 @@ import java.util.Map;
import
org.dom4j.Element
;
import
org.jivesoftware.openfire.Connection
;
import
org.xmpp.packet.Packet
;
import
org.xmpp.packet.PacketError
;
/**
* XEP-0198 Stream Manager.
...
...
@@ -24,7 +25,7 @@ public class StreamManager {
/**
* Connection (stream) to client for the session the manager belongs to
*/
private
Connection
connection
;
private
final
Connection
connection
;
/**
* Whether Stream Management is enabled for session
...
...
@@ -61,7 +62,7 @@ public class StreamManager {
private
Map
<
Long
,
Packet
>
unacknowledgedServerStanzas
=
new
HashMap
<
Long
,
Packet
>();
public
StreamManager
(
Connection
connection
)
{
this
.
setConnection
(
connection
)
;
this
.
connection
=
connection
;
}
/**
...
...
@@ -91,9 +92,9 @@ public class StreamManager {
public
void
sendUnexpectedError
()
{
StringBuilder
sb
=
new
StringBuilder
(
340
);
sb
.
append
(
String
.
format
(
"<failed xmlns='%s'>"
,
getNamespace
()));
sb
.
append
(
"<unexpected-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>"
);
sb
.
append
(
new
PacketError
(
PacketError
.
Condition
.
unexpected_request
).
toXML
()
);
sb
.
append
(
"</failed>"
);
getConnection
().
deliverRawText
(
sb
.
toString
());
getConnection
().
deliverRawText
(
sb
.
toString
());
}
/**
...
...
@@ -127,14 +128,6 @@ public class StreamManager {
return
connection
;
}
/**
* Set connection for the session
* @param connection
*/
public
void
setConnection
(
Connection
connection
)
{
this
.
connection
=
connection
;
}
/**
* Determines whether Stream Management enabled for session this
* manager belongs to.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment