// Then verify that the file descriptor doesn't point to a directory or hard-linked file.
if (fstat(fd, &fileinfo))
{
+ int temp = errno;
close(fd);
+ errno = temp;
return (-1);
}
// Then use lstat to determine whether the filename is a symlink...
if (lstat(filename, &linkinfo))
{
+ int temp = errno;
close(fd);
+ errno = temp;
return (-1);
}
cups_option_t *vars; // Variables
ipp_fattr_cb_t attr_cb; // Attribute (filter) callback
ipp_ferror_cb_t error_cb; // Error reporting callback
- ipp_ftoken_cb_t token_cb; // Token processing callback
void *cb_data; // Callback data
char *buffer; // Output buffer
size_t alloc_buffer; // Size of output buffer
if (error)
{
- // Handle "soft" device access token errors by setting access_expires to
- // the next call time...
- if (!strcmp(error, "slow_down"))
- *access_expires = time(NULL) + 10;
- else
- *access_expires = time(NULL) + 5;
+ if (access_expires)
+ {
+ // Handle "soft" device access token errors by setting access_expires to
+ // the next call time...
+ if (!strcmp(error, "slow_down"))
+ *access_expires = time(NULL) + 10;
+ else
+ *access_expires = time(NULL) + 5;
+ }
// Free memory and return...
cupsJSONDelete(response);