]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
astfd: Not maximum size of a single file but maximum file descriptors. 67/2967/1
authorAlexander Traud <pabstraud@compuserve.com>
Wed, 8 Jun 2016 10:58:48 +0000 (12:58 +0200)
committerAlexander Traud <pabstraud@compuserve.com>
Wed, 8 Jun 2016 11:02:49 +0000 (06:02 -0500)
With menuselect "DEBUG_FD_LEAKS" and CLI "core show fd", the maximum size of a
single file was shown. Now, the maximum number of possible file descriptors is
shown.

ASTERISK-26097

Change-Id: Icf98d145774b38cac144ca76d19eaef42ce659a3

main/astfd.c

index 35f9454a3aaa2505a4791224d1315241c4913de4..1e767036c9c7f69df5c351ddaa5eeff54c7f3b1c 100644 (file)
@@ -271,7 +271,7 @@ static char *handle_show_fd(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
        case CLI_GENERATE:
                return NULL;
        }
-       getrlimit(RLIMIT_FSIZE, &rl);
+       getrlimit(RLIMIT_NOFILE, &rl);
        if (rl.rlim_cur == RLIM_INFINITY || rl.rlim_max == RLIM_INFINITY) {
                ast_copy_string(line, "unlimited", sizeof(line));
        } else {