ENH:Modify the sending logic to ensure that in public network mode, the fallback route is FTP

jira:[none]

Change-Id: I88c3f89960dfc9492e305f7cff0692590078f62c
This commit is contained in:
milk 2025-05-19 14:55:04 +08:00 committed by lane.wei
parent 8205f83b15
commit fe5814e81f

View File

@ -893,10 +893,12 @@ void SendToPrinterDialog::on_ok(wxCommandEvent &event)
file_name = default_output_file_path.filename().string();
}*/
if ((!obj_->is_lan_mode_printer() && obj_->is_support_brtc) || m_tcp_try_connect) {
if ( ( (!obj_->is_lan_mode_printer() && obj_->is_support_brtc) || m_tcp_try_connect) && (!m_ftp_try_connect) ) {
update_print_status_msg(wxEmptyString, false, false);
if (m_file_sys) {
PrintPrepareData print_data;
m_plater->get_print_job_data(&print_data);
std::string project_name = m_current_project_name.utf8_string() + ".3mf";
@ -954,7 +956,7 @@ void SendToPrinterDialog::on_ok(wxCommandEvent &event)
m_connect_try_times++;
},
m_task_timer->GetId());
m_task_timer->StartOnce(timeout_period);
m_task_timer->StartOnce(timeout_period);
}
else {
BOOST_LOG_TRIVIAL(error) << "SendToPrinter::send job: The printer media capability set is incorrect.";
@ -1311,7 +1313,7 @@ void SendToPrinterDialog::update_show_status()
m_file_sys->Stop(true);
m_file_sys.reset();
}
BOOST_LOG_TRIVIAL(info) << "m_ftp_try_connect is " << m_ftp_try_connect;
BOOST_LOG_TRIVIAL(info) << "m_ftp_try_connect is" << m_ftp_try_connect;
// add log
show_status(PrintDialogStatus::PrintStatusReadingFinished);