Skip to content

Commit

Permalink
log-parse-error
Browse files Browse the repository at this point in the history
  • Loading branch information
selvanair committed May 31, 2024
1 parent 83034c4 commit c1553fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,11 @@ ParseManagementAddress(connection_t *c)

ret = (addr->sin_port != 0);

if (ret && pw_file)
if (!ret)
{
MsgToEventLog(EVENTLOG_ERROR_TYPE, L"Error parsing --management option: port not specified or invalid");
}
else if (pw_file)
{
if (PathIsRelativeW(pw_file))
{
Expand All @@ -928,6 +932,7 @@ ParseManagementAddress(connection_t *c)
if (!fp
|| !fgets(c->manage.password, sizeof(c->manage.password), fp))
{
MsgToEventLog(EVENTLOG_ERROR_TYPE, L"Error processing --management option: failed to read password file <%ls>", pw_file);
/* This may be normal as not all users may be given access to this secret */
ret = false;
}
Expand Down

0 comments on commit c1553fd

Please sign in to comment.