Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
joram
joram
Commits
8b220087
Commit
8b220087
authored
Feb 07, 2011
by
Guillaume Surrel
Browse files
Fix: The server now validates that the delivery-tag refers to a delivered message.
parent
b367b363
Changes
1
Hide whitespace changes
Inline
Side-by-side
mom-amqp/org.ow2.joram.mom.amqp/src/main/java/org/ow2/joram/mom/amqp/Proxy.java
View file @
8b220087
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2008 - 20
09
ScalAgent Distributed Technologies
* Copyright (C) 2008 - 20
11
ScalAgent Distributed Technologies
* Copyright (C) 2008 - 2009 CNES
*
* This library is free software; you can redistribute it and/or
...
...
@@ -417,7 +417,8 @@ public class Proxy implements DeliveryListener {
}
}
public
void
basicAck
(
long
deliveryTag
,
boolean
multiple
,
int
channelNumber
)
{
public
void
basicAck
(
long
deliveryTag
,
boolean
multiple
,
int
channelNumber
)
throws
PreconditionFailedException
{
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
"Proxy.basicAck("
+
deliveryTag
+
", "
+
channelNumber
+
')'
);
...
...
@@ -439,6 +440,7 @@ public class Proxy implements DeliveryListener {
return
;
}
}
throw
new
PreconditionFailedException
(
"Acknowledgement error: invalid tag."
);
}
else
{
Map
<
QueueShell
,
List
<
Long
>>
deliveryMap
=
new
HashMap
<
QueueShell
,
List
<
Long
>>();
while
(
iter
.
hasNext
())
{
...
...
@@ -455,6 +457,9 @@ public class Proxy implements DeliveryListener {
break
;
}
}
if
(
deliveryMap
.
size
()
==
0
)
{
throw
new
PreconditionFailedException
(
"Acknowledgement error: invalid tag."
);
}
Iterator
<
QueueShell
>
iterQueues
=
deliveryMap
.
keySet
().
iterator
();
while
(
iterQueues
.
hasNext
())
{
QueueShell
queue
=
iterQueues
.
next
();
...
...
Write
Preview
Supports
Markdown
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