Skip to content

Commit

Permalink
Use a TextMap for ChannelTable
Browse files Browse the repository at this point in the history
  • Loading branch information
fbraem committed Mar 19, 2019
1 parent 5fb96a3 commit 5cc8777
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion MQWeb/src/ChannelRemove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,17 @@ ChannelRemove::ChannelRemove(CommandServer& commandServer, Poco::JSON::Object::P

// Optional Parameters
addParameter<std::string>(MQCACF_COMMAND_SCOPE, "CommandScope");
addParameterNumFromString(MQIACH_CHANNEL_TABLE, "ChannelTable");
static TextMap channelTableMap = TextMapInitializer
(MQCHTAB_Q_MGR, "QMgr")
(MQCHTAB_CLNTCONN, "Client-connection")
;
std::string channelTable = input->get("ChannelTable");
for (TextMap::const_iterator it = channelTableMap.begin(); it != channelTableMap.end(); ++it)
{
if (it->second.compare(channelTable) == 0) {
pcf()->addParameter(MQIACH_CHANNEL_TABLE, it->first);
}
}
addParameterNumFromString(MQIA_QSG_DISP, "QSGDisposition");
addParameterNumFromString(MQIACH_CHANNEL_TYPE, "ChannelType");
}
Expand Down

0 comments on commit 5cc8777

Please sign in to comment.