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
1c054a2e
Commit
1c054a2e
authored
Jan 07, 2016
by
Dave Cridland
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #496 from aztaru/fixbug-xep0049
Fix implementation bug for XEP0049.
parents
2d232c58
a4d91a49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
PrivateStorage.java
src/java/org/jivesoftware/openfire/PrivateStorage.java
+7
-5
No files found.
src/java/org/jivesoftware/openfire/PrivateStorage.java
View file @
1c054a2e
...
@@ -53,11 +53,11 @@ public class PrivateStorage extends BasicModule implements UserEventListener {
...
@@ -53,11 +53,11 @@ public class PrivateStorage extends BasicModule implements UserEventListener {
private
static
final
Logger
Log
=
LoggerFactory
.
getLogger
(
PrivateStorage
.
class
);
private
static
final
Logger
Log
=
LoggerFactory
.
getLogger
(
PrivateStorage
.
class
);
private
static
final
String
LOAD_PRIVATE
=
private
static
final
String
LOAD_PRIVATE
=
"SELECT privateData FROM ofPrivate WHERE username=? AND namespace=?"
;
"SELECT privateData FROM ofPrivate WHERE username=? AND name
=? AND name
space=?"
;
private
static
final
String
INSERT_PRIVATE
=
private
static
final
String
INSERT_PRIVATE
=
"INSERT INTO ofPrivate (privateData,
name,username,
namespace) VALUES (?,?,?,?)"
;
"INSERT INTO ofPrivate (privateData,
name, username,
namespace) VALUES (?,?,?,?)"
;
private
static
final
String
UPDATE_PRIVATE
=
private
static
final
String
UPDATE_PRIVATE
=
"UPDATE ofPrivate SET privateData=?
, name=? WHERE
username=? AND namespace=?"
;
"UPDATE ofPrivate SET privateData=?
WHERE name=? AND
username=? AND namespace=?"
;
private
static
final
String
DELETE_PRIVATES
=
private
static
final
String
DELETE_PRIVATES
=
"DELETE FROM ofPrivate WHERE username=?"
;
"DELETE FROM ofPrivate WHERE username=?"
;
...
@@ -119,7 +119,8 @@ public class PrivateStorage extends BasicModule implements UserEventListener {
...
@@ -119,7 +119,8 @@ public class PrivateStorage extends BasicModule implements UserEventListener {
con
=
DbConnectionManager
.
getConnection
();
con
=
DbConnectionManager
.
getConnection
();
pstmt
=
con
.
prepareStatement
(
LOAD_PRIVATE
);
pstmt
=
con
.
prepareStatement
(
LOAD_PRIVATE
);
pstmt
.
setString
(
1
,
username
);
pstmt
.
setString
(
1
,
username
);
pstmt
.
setString
(
2
,
data
.
getNamespaceURI
());
pstmt
.
setString
(
2
,
data
.
getName
());
pstmt
.
setString
(
3
,
data
.
getNamespaceURI
());
rs
=
pstmt
.
executeQuery
();
rs
=
pstmt
.
executeQuery
();
boolean
update
=
false
;
boolean
update
=
false
;
if
(
rs
.
next
())
{
if
(
rs
.
next
())
{
...
@@ -173,7 +174,8 @@ public class PrivateStorage extends BasicModule implements UserEventListener {
...
@@ -173,7 +174,8 @@ public class PrivateStorage extends BasicModule implements UserEventListener {
con
=
DbConnectionManager
.
getConnection
();
con
=
DbConnectionManager
.
getConnection
();
pstmt
=
con
.
prepareStatement
(
LOAD_PRIVATE
);
pstmt
=
con
.
prepareStatement
(
LOAD_PRIVATE
);
pstmt
.
setString
(
1
,
username
);
pstmt
.
setString
(
1
,
username
);
pstmt
.
setString
(
2
,
data
.
getNamespaceURI
());
pstmt
.
setString
(
2
,
data
.
getName
());
pstmt
.
setString
(
3
,
data
.
getNamespaceURI
());
rs
=
pstmt
.
executeQuery
();
rs
=
pstmt
.
executeQuery
();
if
(
rs
.
next
())
{
if
(
rs
.
next
())
{
data
.
clearContent
();
data
.
clearContent
();
...
...
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