Skip to content

Commit

Permalink
Adds logging and changes return status for bad temp dir: Issue #1028
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiggins26 committed Sep 26, 2023
1 parent 1ba3f03 commit 39c51b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions clamd/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,10 @@ int execute_or_dispatch_command(client_conn_t *conn, enum commands cmd, const ch
}
case COMMAND_INSTREAM: {
int rc = cli_gentempfd(optget(conn->opts, "TemporaryDirectory")->strarg, &conn->filename, &conn->scanfd);
if (rc != CL_SUCCESS)
return rc;
if (rc != CL_SUCCESS) {
logg(LOGG_ERROR, "Failed to generate file in TemporaryDirectory, filename: %s \n", &conn->filename);
return 1;
}
conn->quota = optget(conn->opts, "StreamMaxLength")->numarg;
conn->mode = MODE_STREAM;
return 0;
Expand Down

0 comments on commit 39c51b5

Please sign in to comment.