diff --git a/src/aktualizr_secondary/aktualizr_secondary.cc b/src/aktualizr_secondary/aktualizr_secondary.cc index aed36fbea7..87b43bbd91 100644 --- a/src/aktualizr_secondary/aktualizr_secondary.cc +++ b/src/aktualizr_secondary/aktualizr_secondary.cc @@ -101,6 +101,7 @@ bool AktualizrSecondary::sendFirmware(const std::string& firmware) { return false; } + LOG_INFO << "Download successful."; return true; } @@ -198,6 +199,7 @@ bool AktualizrSecondary::doFullVerification(const Metadata& metadata) { pending_target_ = targetsForThisEcu[0]; + LOG_DEBUG << "Meta verification passed."; return true; } diff --git a/src/aktualizr_secondary/secondary_tcp_server.cc b/src/aktualizr_secondary/secondary_tcp_server.cc index 88b7e82336..96a82af352 100644 --- a/src/aktualizr_secondary/secondary_tcp_server.cc +++ b/src/aktualizr_secondary/secondary_tcp_server.cc @@ -17,7 +17,7 @@ SecondaryTcpServer::SecondaryTcpServer(Uptane::SecondaryInterface &secondary, co ConnectionSocket conn_socket(primary_ip, primary_port, listen_socket_.port()); if (conn_socket.connect() == 0) { - LOG_INFO << "Connected to Primary, sending info about this secondary..."; + LOG_INFO << "Connected to Primary, sending info about this Secondary..."; HandleOneConnection(*conn_socket); } else { LOG_INFO << "Failed to connect to Primary"; @@ -34,7 +34,7 @@ void SecondaryTcpServer::run() { sockaddr_storage peer_sa{}; socklen_t peer_sa_size = sizeof(sockaddr_storage); - LOG_DEBUG << "Waiting for connection from client..."; + LOG_DEBUG << "Waiting for connection from Primary..."; int con_fd = accept(*listen_socket_, reinterpret_cast(&peer_sa), &peer_sa_size); if (con_fd == -1) { LOG_INFO << "Socket accept failed. aborting"; @@ -146,14 +146,15 @@ bool SecondaryTcpServer::HandleOneConnection(int socket) { r->result = ok ? AKInstallationResult_success : AKInstallationResult_failure; } break; case AKIpUptaneMes_PR_sendFirmwareReq: { + LOG_DEBUG << "Received sendFirmwareReq from Primary."; auto fw = msg->sendFirmwareReq(); auto send_firmware_result = impl_.sendFirmware(ToString(fw->firmware)); resp->present(AKIpUptaneMes_PR_sendFirmwareResp); auto r = resp->sendFirmwareResp(); r->result = send_firmware_result ? AKInstallationResult_success : AKInstallationResult_failure; - LOG_INFO << "Download " << (send_firmware_result ? "successful" : "failed") << "."; } break; case AKIpUptaneMes_PR_installReq: { + LOG_DEBUG << "Received installReq from Primary."; auto request = msg->installReq(); auto install_result = impl_.install(ToString(request->hash));