Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix queue declaration arguments #50

Merged
merged 2 commits into from
Sep 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/qamqpexchange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 321,6 @@ void QAmqpExchange::publish(const QByteArray &message, const QString &routingKey
content.setProperty(QAmqpMessage::ContentType, mimeType);
content.setProperty(QAmqpMessage::ContentEncoding, "utf-8");
content.setProperty(QAmqpMessage::Headers, headers);
content.setProperty(QAmqpMessage::MessageId, "0");

QAmqpMessage::PropertyHash::ConstIterator it;
QAmqpMessage::PropertyHash::ConstIterator itEnd = properties.constEnd();
Expand Down
6 changes: 3 additions & 3 deletions src/qamqpqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 263,8 @@ void QAmqpQueuePrivate::declare()
QAmqpMethodFrame frame(QAmqpFrame::Queue, QAmqpQueuePrivate::miDeclare);
frame.setChannel(channelNumber);

QByteArray arguments;
QDataStream out(&arguments, QIODevice::WriteOnly);
QByteArray args;
QDataStream out(&args, QIODevice::WriteOnly);

out << qint16(0); //reserved 1
QAmqpFrame::writeAmqpField(out, QAmqpMetaType::ShortString, name);
Expand All @@ -276,7 276,7 @@ void QAmqpQueuePrivate::declare()
options & QAmqpQueue::Exclusive, options & QAmqpQueue::AutoDelete,
options & QAmqpQueue::NoWait);

frame.setArguments(arguments);
frame.setArguments(args);
sendFrame(frame);

if (delayedDeclare)
Expand Down