[Asterisk-code-review] cli: Add core dump info to core show settings. (asterisk[master])

Benjamin Keith Ford asteriskteam at digium.com
Wed Feb 2 14:55:33 CST 2022


Attention is currently required from: Sean Bright, N A, Joshua Colp, George Joseph.
Benjamin Keith Ford has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/17868 )

Change subject: cli: Add core dump info to core show settings.
......................................................................


Patch Set 7: Code-Review-1

(1 comment)

File main/asterisk.c:

https://gerrit.asterisk.org/c/asterisk/+/17868/comment/f2358b9f_4f8835e1 
PS7, Line 539: 	if (!getcwd(dir, sizeof(dir)) || eaccess(dir, R_OK | X_OK | F_OK)) {
             : 		if (eaccess(dir, R_OK | X_OK | F_OK)) {
             : 			ast_cli(a->fd, "  Running directory:           %s\n", "Unable to access");
             : 		} else {
             : 			ast_cli(a->fd, "  Running directory:           %s (%s)\n", dir, "Unable to access");
             : 		}
             : 	} else {
             : 		ast_cli(a->fd, "  Running directory:           %s\n", dir);
             : 	}
Any reason for calling eaccess twice here? If the logic was changed to just check if getcwd was successful, you could then call eaccess afterwards only once.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17868
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ic42c0a9ecc233381aad274d86c62808d1ebb4d83
Gerrit-Change-Number: 17868
Gerrit-PatchSet: 7
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-CC: George Joseph <gjoseph at digium.com>
Gerrit-CC: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Sean Bright <sean at seanbright.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Wed, 02 Feb 2022 20:55:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220202/81bca4e2/attachment.html>


More information about the asterisk-code-review mailing list