[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] session: add getters for session cipher names


On Sunday 02 February 2014 04:56:22 you wrote:
> Hi,

Hi Jon,
 
> The attached patch exposes getters for the in/out ciphers
> used for a given session.  The usecase for this is that
> it may be interesting information to have in the server
> context.

thanks again for your contributions! I would just like to request a small 
change to the patch.

+    if (session &&
+        session->current_crypto &&
+        session->current_crypto->in_cipher) {
+        return session->current_crypto->in_cipher->name;

I prefer

if (session == NULL &&
    session->current_crypto == NULL &&
    session->current_crypto->in_cipher == NULL) {

It is just more clean when reading that you do NULL pointer checks here :)


		-- andreas


Follow-Ups:
Re: [PATCH] session: add getters for session cipher namesJon Simons <jon@xxxxxxxxxxxxx>
References:
[PATCH] session: add getters for session cipher namesJon Simons <jon@xxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org