summaryrefslogtreecommitdiff
path: root/client-qt/udm-client-qt/client_session.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-08-21 04:05:55 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-08-21 04:05:55 +0300
commitc8029a36924fdad89b2455746bfd771da723287f (patch)
treeecf981983d178176bd2e9619c7040c743c34d67d /client-qt/udm-client-qt/client_session.cpp
parentc83c19a7d93ee77617c6e47bf0700346545b4611 (diff)
client-qt:
correct network thread termination downloads model skeleton filters model skeleton empty download info tabwindow main window layout initial server data requests (settings, modules, downloads) protocol: renamed most of ui_* messages to download_ui* as it more precise reworked ui related proto part added download related messages (should be sufficient for now) some work on event subscription part bit of work on module related messages added more top level messages (most of defined messages may be used now)
Diffstat (limited to 'client-qt/udm-client-qt/client_session.cpp')
-rw-r--r--client-qt/udm-client-qt/client_session.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/client-qt/udm-client-qt/client_session.cpp b/client-qt/udm-client-qt/client_session.cpp
index 45e93b9..9cb951c 100644
--- a/client-qt/udm-client-qt/client_session.cpp
+++ b/client-qt/udm-client-qt/client_session.cpp
@@ -26,7 +26,7 @@
#include <QMetaType>
Q_DECLARE_METATYPE(server_msg);
-int shit = qRegisterMetaType <server_msg> ("server_msg");
+int server_msg_metatype__useless_id = qRegisterMetaType <server_msg> ("server_msg");
std::shared_ptr<char*> pack_data(const std::string &buf, int *size_)
{
@@ -221,11 +221,11 @@ void client_session::handle_connect(const boost::system::error_code &e)
{
emit client_connected(true, QString::fromUtf8(e.message().c_str()));
//TODO: something better ?
- {// for now hust send auth request message
+ {// for now just send auth request message
client_msg msg;
msg.set_type(CLIENT_MSG_TYPE::CLIENT_AUTH_REQUEST);
- msg.mutable_auth_info()->set_hash_type(PASSWD_HASH_TYPE::HASH_SHA512);
- msg.mutable_auth_info()->set_password(password_sha512.data());
+ msg.mutable_auth_request()->set_hash_type(PASSWD_HASH_TYPE::HASH_SHA512);
+ msg.mutable_auth_request()->set_password(password_sha512.data());
send_message(msg);
}
//listen for messages from server
@@ -305,11 +305,11 @@ void client_session::handle_write(const boost::system::error_code& error)
client_session::~client_session()
{
//TODO: correct thread termination, reimplement
- io_service_.stop();
+// io_service_.stop();
delete socket_;
- boost::asio::io_service *s = &io_service_;
- delete s;
- //emit terminate_thread();
+// boost::asio::io_service *s = &io_service_;
+// delete s;
+ emit terminate_thread();
}
/*boost::asio::io_service &client_session::io_service()