Skip to content

Commit

Permalink
Merge pull request #50 from TomVS/master
Browse files Browse the repository at this point in the history
Fix queue declaration arguments
  • Loading branch information
mbroadst authored Sep 22, 2016
2 parents d3180c6 2270f0b commit 6d73c4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
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

0 comments on commit 6d73c4c

Please sign in to comment.