From 4d2ff11c7463ee1b938d0e0c5e32458bc0cbe3e8 Mon Sep 17 00:00:00 2001 From: 15549494042 Date: Fri, 2 Feb 2024 15:41:15 +0800 Subject: [PATCH] Modifying conflicts between WiFi and P2P IP addresses Singed-off-by:dongzhengkuan@huawei.com Signed-off-by: 15549494042 --- services/print_service/src/print_cups_client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/print_service/src/print_cups_client.cpp b/services/print_service/src/print_cups_client.cpp index 06317cf..2d2f32a 100644 --- a/services/print_service/src/print_cups_client.cpp +++ b/services/print_service/src/print_cups_client.cpp @@ -930,7 +930,7 @@ JobParameters* PrintCupsClient::BuildJobParameters(const PrintJob &jobInfo) params->jobOriginatingUserName = DEFAULT_USER; params->mediaSize = GetMedieSize(jobInfo); params->color = GetColorString(jobInfo.GetColorMode()); - jobParams->printerId = jobInfo.GetPrinterId(); + params->printerId = jobInfo.GetPrinterId(); params->printerName = PrintUtil::StandardizePrinterName(optionJson["printerName"]); params->printerUri = optionJson["printerUri"]; params->documentFormat = optionJson["documentFormat"]; @@ -1176,7 +1176,7 @@ float PrintCupsClient::ConvertInchTo100MM(float num) bool PrintCupsClient::IsIpConflict(const std::string &printerId, std::string &nic) { - if (printerId.find(P2P_PRINTER) == std::string.npos) { + if (printerId.find(P2P_PRINTER) == std::string::npos) { PRINT_HILOGD("The printer is not p2p: %{private}s", printerId.c_str()); return false; } @@ -1208,6 +1208,6 @@ std::string PrintCupsClient::GetIpAddress(unsigned int number) unsigned int ip2 = (number << IP_RIGHT_SHIFT_8) >> IP_RIGHT_SHIFT_24; unsigned int ip1 = (number << IP_RIGHT_SHIFT_16) >> IP_RIGHT_SHIFT_24; unsigned int ip0 = (number << IP_RIGHT_SHIFT_24) >> IP_RIGHT_SHIFT_24; - return sdt::to_string(ip3) + "." + sdt::to_string(ip2) + "." + sdt::to_string(ip1) + "." + sdt::to_string(ip0); + return std::to_string(ip3) + "." + std::to_string(ip2) + "." + std::to_string(ip1) + "." + std::to_string(ip0); } } \ No newline at end of file