]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_crypto: don't complain about directories
authorPhilip Prindeville <philipp@redfish-solutions.com>
Tue, 13 Sep 2022 19:41:45 +0000 (13:41 -0600)
committerPhilip Prindeville <philipp@redfish-solutions.com>
Thu, 15 Sep 2022 05:15:13 +0000 (23:15 -0600)
ASTERISK-30226 #close

Change-Id: I5695fb0c9521f112f754b8362cff2a8f3eff05c5

res/res_crypto.c

index efcee7cffd4095d32b4453edd6506eb764c70e38..bc6631833357c9c5d22f0dc122b3ddf0e3efca7e 100644 (file)
@@ -786,6 +786,9 @@ static void crypto_load(int ifd, int ofd)
                        if (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, "..")) {
                                continue;
                        }
+                       if (ent->d_type == DT_DIR) {
+                               continue;
+                       }
                        if (ent->d_type != DT_REG) {
                                ast_log(LOG_WARNING, "Non-regular file '%s' in keys directory\n", ent->d_name);
                                continue;