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

Permit multiple attempts to load PostgreSQL CDR module. #737

Conversation

chrsmj
Copy link
Contributor

@chrsmj chrsmj commented May 16, 2024

Missing or corrupt cdr_pgsql.conf configuration file can cause the second attempt to load the PostgreSQL CDR module to crash Asterisk via the Command Line Interface because a null CLI command is registered on the first failed attempt to load the module.

Resolves: #736

@chrsmj
Copy link
Contributor Author

chrsmj commented May 16, 2024

cherry-pick-to: 21
cherry-pick-to: 20
cherry-pick-to: 18

@seanbright
Copy link
Contributor

The UserNote in the commit message isn’t necessary

@chrsmj chrsmj force-pushed the prevent-crash-on-cli-when-repeating-loads-of-cdr-pgsql branch from df183e7 to fdd330d Compare May 17, 2024 15:45
Copy link
Contributor

@seanbright seanbright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the specific comments I made, we use tabs for indentation, not spaces.

cdr/cdr_pgsql.c Outdated Show resolved Hide resolved
cdr/cdr_pgsql.c Outdated Show resolved Hide resolved
cdr/cdr_pgsql.c Outdated Show resolved Hide resolved
@chrsmj chrsmj force-pushed the prevent-crash-on-cli-when-repeating-loads-of-cdr-pgsql branch from fdd330d to 1397494 Compare May 20, 2024 19:15
Copy link
Contributor

@seanbright seanbright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely up to you, but I believe this results in the desired behavior and is slightly less verbose.

cdr/cdr_pgsql.c Outdated Show resolved Hide resolved
Copy link
Member

@jcolp jcolp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing or corrupt cdr_pgsql.conf configuration file can cause the
second attempt to load the PostgreSQL CDR module to crash Asterisk via
the Command Line Interface because a null CLI command is registered on
the first failed attempt to load the module.

Resolves: asterisk#736
@gtjoseph gtjoseph added the cherry-pick-test Trigger dry run of cherry-picks label Jun 5, 2024
@github-actions github-actions bot added cherry-pick-testing-in-progress Cherry-Pick tests in progress cherry-pick-checks-passed Cherry-Pick checks passed cherry-pick-gates-failed Cherry-Pick gates failed and removed cherry-pick-test Trigger dry run of cherry-picks cherry-pick-testing-in-progress Cherry-Pick tests in progress labels Jun 5, 2024
@asterisk-org-access-app asterisk-org-access-app bot merged commit f789b77 into asterisk:master Jun 5, 2024
68 of 79 checks passed
Copy link

github-actions bot commented Jun 5, 2024

Successfully merged to branch master and cherry-picked to ["21","20","18"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: Seg fault on CLI after PostgreSQL CDR module fails to load for a second time
5 participants