shutdown(m_sock, SHUT_RDWR);
close(m_sock);
pthread_mutex_destroy(&m_mutex);
shutdown(m_sock, SHUT_RDWR);
close(m_sock);
pthread_mutex_destroy(&m_mutex);
bool Conn::Impl::request(REQUEST_TYPE type, const std::string& userName, const std::string& password, const PAIRS& pairs)
{
bool Conn::Impl::request(REQUEST_TYPE type, const std::string& userName, const std::string& password, const PAIRS& pairs)
{
MapGen map;
for (PAIRS::const_iterator it = pairs.begin(); it != pairs.end(); ++it)
map.add(it->first, new StringGen(it->second));
MapGen map;
for (PAIRS::const_iterator it = pairs.begin(); it != pairs.end(); ++it)
map.add(it->first, new StringGen(it->second));
int res = select(m_sock + 1, &fds, NULL, NULL, &tv);
int res = select(m_sock + 1, &fds, NULL, NULL, &tv);
for (PairsParser::Pairs::const_iterator it = m_parser.reply().begin(); it != m_parser.reply().end(); ++it)
data.reply.push_back(std::make_pair(it->first, it->second));
for (PairsParser::Pairs::const_iterator it = m_parser.modify().begin(); it != m_parser.modify().end(); ++it)
for (PairsParser::Pairs::const_iterator it = m_parser.reply().begin(); it != m_parser.reply().end(); ++it)
data.reply.push_back(std::make_pair(it->first, it->second));
for (PairsParser::Pairs::const_iterator it = m_parser.modify().begin(); it != m_parser.modify().end(); ++it)