Skip to content

Commit

Permalink
Rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
Vzor- committed Apr 27, 2024
1 parent d0d8d84 commit b491f2e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qz/utils/PrintingUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ public byte[] read(String data, String xmlTag) throws IOException {
case HEX:
return ByteUtilities.hexStringToByteArray(data.trim());
case XML:
// Assume base64 encoded string inside the specified XML tag
return Base64.decodeBase64(FileUtilities.readXMLFile(data, xmlTag).getBytes(StandardCharsets.UTF_8));
// Assume base64 encoded string inside the specified XML tag
return Base64.decodeBase64(FileUtilities.readXMLFile(data, xmlTag).getBytes(StandardCharsets.UTF_8));
case PLAIN:
default:
// Reading "plain" data is only supported through JSON/websocket, so we can safely assume it's always UTF8
Expand Down Expand Up @@ -262,7 +262,7 @@ public static void cancelJobs(Session session, String UID, JSONObject params) {
private static void cancelJobById(int jobId, NativePrinter printer) {
if (SystemUtilities.isWindows()) {
WinNT.HANDLEByReference phPrinter = getWmiPrinter(printer);
// TODO: Change to "Winspool" when JNA 5.14.0+ is bundled
// TODO: Change to "Winspool" when JNA 5.14.0+ is bundled
if (!WinspoolEx.INSTANCE.SetJob(phPrinter.getValue(), jobId, 0, null, WinspoolEx.JOB_CONTROL_DELETE)) {
Win32Exception e = new Win32Exception(Kernel32.INSTANCE.GetLastError());
log.warn("Job deletion error for job#{}, {}", jobId, e);
Expand Down

0 comments on commit b491f2e

Please sign in to comment.