From 9a60d2feb081fe6d982061c9ff8ff70a2d28dd40 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Sat, 11 Apr 2020 09:41:08 +0200 Subject: [PATCH] Fixed cups httpConnectEncrypt deprecation warning. --- channels/printer/client/cups/printer_cups.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/channels/printer/client/cups/printer_cups.c b/channels/printer/client/cups/printer_cups.c index 3d94d6b8e..8e462c1b1 100644 --- a/channels/printer/client/cups/printer_cups.c +++ b/channels/printer/client/cups/printer_cups.c @@ -178,9 +178,13 @@ static rdpPrintJob* printer_cups_create_printjob(rdpPrinter* printer, UINT32 id) { char buf[100]; +#if !defined(_CUPS_API_1_7) cups_printjob->printjob_object = httpConnectEncrypt(cupsServer(), ippPort(), HTTP_ENCRYPT_IF_REQUESTED); - +#else + cups_printjob->printjob_object = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, + HTTP_ENCRYPT_IF_REQUESTED, 1, 10000, NULL); +#endif if (!cups_printjob->printjob_object) { free(cups_printjob);