From c8029a36924fdad89b2455746bfd771da723287f Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 21 Aug 2015 04:05:55 +0300 Subject: 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) --- client-qt/udm-client-qt/client_session.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'client-qt/udm-client-qt/client_session.cpp') 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 Q_DECLARE_METATYPE(server_msg); -int shit = qRegisterMetaType ("server_msg"); +int server_msg_metatype__useless_id = qRegisterMetaType ("server_msg"); std::shared_ptr 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() -- cgit v1.2.3