Skip to content

Commit

Permalink
Improve documentation and docstrings. Also fix default variable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Mar 18, 2021
1 parent 91c2e2a commit e1d992a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion doc/gvmd.8
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Scanner type for --create-scanner and --modify-scanner.
Either 'OpenVAS', 'OSP', 'GMP', 'OSP-Sensor' or a number as used in GMP.
.TP
\fB--scanner-connection-retry=\fINUMBER\fB\f1
During a running task, number of auto retry on scanner connection lost, default 3.
Number of auto retries if scanner connection is lost in a running task.
.TP
\fB--schedule-timeout=\fITIME\fB\f1
Time out tasks that are more than TIME minutes overdue. -1 to disable, 0 for minimum time.
Expand Down
4 changes: 2 additions & 2 deletions doc/gvmd.8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<option>
<p><opt>--scanner-connection-retry=<arg>NUMBER</arg></opt></p>
<optdesc>
<p>During a running task, number of auto retry on scanner connection
lost, default 3.</p>
<p>Number of auto retries if scanner connection is lost
in a running task.</p>
</optdesc>
</option>
<option>
Expand Down
4 changes: 2 additions & 2 deletions src/gvmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1961,8 +1961,8 @@ gvmd (int argc, char** argv)
"<scanner-ca-pub>" },
{ "scanner-connection-retry", '\0', 0, G_OPTION_ARG_INT,
&scanner_connection_retry,
"During a running task, number of auto retry on lost connection,"
" default: "G_STRINGIFY (SCANNER_CONNECTION_RETRY),
"Number of auto retries if scanner connection is lost in a running task,"
" default: "G_STRINGIFY (SCANNER_CONNECTION_RETRY_DEFAULT),
"<number>" },
{ "scanner-credential", '\0', 0, G_OPTION_ARG_STRING,
&scanner_credential,
Expand Down
11 changes: 6 additions & 5 deletions src/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ static int relay_migrate_sensors = 0;
static int schedule_timeout = SCHEDULE_TIMEOUT_DEFAULT;

/**
* @brief Default for max auto retry on connection to scanner lost.
* @brief Default number of auto retries if scanner connection is
* lost in a running task.
*/
static int scanner_connection_retry = SCANNER_CONNECTION_RETRY_DEFAULT;

Expand Down Expand Up @@ -4687,9 +4688,9 @@ run_osp_task (task_t task, int from, char **report_id)
}

/**
* @brief Get the number of retry on a scanner connection lost.
* @brief Get the number of retries on a scanner connection lost.
*
* @return The number of retry on a scanner connection lost.
* @return The number of retries on a scanner connection lost.
*/
int
get_scanner_connection_retry ()
Expand All @@ -4698,9 +4699,9 @@ get_scanner_connection_retry ()
}

/**
* @brief Set the number of retry on a scanner connection lost.
* @brief Set the number of retries on a scanner connection lost.
*
* @param new_retry The number of retry on a scanner connection lost.
* @param new_retry The number of retries on a scanner connection lost.
*/
void
set_scanner_connection_retry (int new_retry)
Expand Down

0 comments on commit e1d992a

Please sign in to comment.