Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added retry of sensor connection for performance reports on failure. #1633

Conversation

jhelmold
Copy link
Member

@jhelmold jhelmold commented Jul 15, 2021

Added retry of sensor connection for performance reports on failure.

What
In manage.c in function get_osp_performance_string (..):
The installation of the connection to the sensor via
osp_connect_with_data (..) and the access to the
performance data via osp_get_performance_ext (..) are
now retried several times on failure.

AP-1479

Why:
This fixes a bug.

How did you test it:
Ran the report that uses the connection several times.

Checklist:

In manage.c in function get_osp_performance_string (..):
  The installation of the connection to the sensor via
  osp_connect_with_data (..) and the access to the
  performance data via osp_get_performance_ext (..) are
  now retried several times on failure.
@jhelmold jhelmold added backport-to-oldstable This pull request will be backported to the oldstable branch backport-to-main This pull request will be ported to the master branch labels Jul 16, 2021
@jhelmold jhelmold marked this pull request as ready for review July 16, 2021 07:15
@jhelmold jhelmold requested a review from a team as a code owner July 16, 2021 07:15
src/manage.c Outdated Show resolved Hide resolved
in manage.c, in function get_osp_performance_string(..):
  Moved the declaration of the variable "return_value"
  to the top of the function.
In manage.c, in function get_osp_performance_string (..):
  Replaced the assignment of value "connection_retry =
  SCANNER_CONNECTION_RETRY_DEFAULT;" by
  "connection_retry = get_scanner_connection_retry();".
In manage.c in function get_osp_performance_string (..):
  Amended the formatting of a while statement and the calls
  of get_scanner_connection_retry ().
In manage.c, in function get_osp_performance_string (..):
  Rebuild the logic of the connection retries for
  osp_connect_with_data (..) and osp_get_performance_ext (..)
  slightly.
@timopollmeier timopollmeier merged commit a8a9bbd into greenbone:gvmd-21.04 Jul 19, 2021
timopollmeier added a commit that referenced this pull request Jul 19, 2021
Added retry of sensor connection for performance reports on failure. (backport #1633)
timopollmeier added a commit that referenced this pull request Jul 19, 2021
Added retry of sensor connection for performance reports on failure. (backport #1633)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-main This pull request will be ported to the master branch backport-to-oldstable This pull request will be backported to the oldstable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants