Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv16010/res

Modified Files:
        res_crypto.c 
Log Message:
add count to 'show keys' (issue #5002)


Index: res_crypto.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_crypto.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- res_crypto.c        5 Aug 2005 16:29:30 -0000       1.24
+++ res_crypto.c        23 Aug 2005 15:41:17 -0000      1.25
@@ -501,6 +501,7 @@
 {
        struct ast_key *key;
        char sum[16 * 2 + 1];
+       int count_keys = 0;
 
        ast_mutex_lock(&keylock);
        key = keys;
@@ -512,8 +513,10 @@
                        key->ktype & KEY_NEEDS_PASSCODE ? "[Needs Passcode]" : 
"[Loaded]", sum);
                                
                key = key->next;
+               count_keys++;
        }
        ast_mutex_unlock(&keylock);
+       ast_cli(fd, "%d known RSA keys.\n", count_keys);
        return RESULT_SUCCESS;
 }
 

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to