Skip to content

Commit 302ceda

Browse files
committed
Mirror some cleanup from CUPS 2.x.
1 parent 7404a8e commit 302ceda

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

cups/json.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "cups-private.h"
1111
#include "json-private.h"
1212
#include <sys/stat.h>
13+
#include <fcntl.h>
1314

1415

1516
//
@@ -1160,7 +1161,7 @@ cupsJSONImportURL(
11601161
if (!_cups_strcasecmp(httpGetField(http, HTTP_FIELD_CONNECTION), "close"))
11611162
{
11621163
httpClearFields(http);
1163-
if (!httpConnectAgain(http, 30000, NULL))
1164+
if (!httpConnectAgain(http, /*msec*/30000, /*cancel*/NULL))
11641165
{
11651166
status = HTTP_STATUS_ERROR;
11661167
break;
@@ -1269,7 +1270,7 @@ cupsJSONImportURL(
12691270
else
12701271
{
12711272
// Save the last HTTP status as a CUPS error...
1272-
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(errno), false);
1273+
_cupsSetHTTPError(http, status);
12731274
}
12741275

12751276
// Flush any remaining data...

cups/jwt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# include <openssl/ecdsa.h>
1515
# include <openssl/evp.h>
1616
# include <openssl/rsa.h>
17-
#else
17+
#else // HAVE_GNUTLS
1818
# include <gnutls/gnutls.h>
1919
# include <gnutls/abstract.h>
2020
# include <gnutls/crypto.h>

cups/jwt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// JSON Web Token API definitions for CUPS.
33
//
4-
// Copyright © 2023 by OpenPrinting.
4+
// Copyright © 2023-2024 by OpenPrinting.
55
//
66
// Licensed under Apache License v2.0. See the file "LICENSE" for more
77
// information.

0 commit comments

Comments
 (0)