Subject: [PATCH] Fix trace context lookup in libssh2_debug()

[PATCH] Fix trace context lookup in libssh2_debug()

From: Dave McCaldon <davem_at_intersystems.com>
Date: Mon, 25 Jan 2010 17:32:12 -0500

The logic in libssh2_debug() that prints out the context was incorrectly looking up the context text. The context flags are in fact a bitmask, not an enumeration (see libssh2.h), but the logic was indexing the context text array with the context as if it were an enumeration.

This patch updates the code to search the context text array based on the bits set in the context; if multiple bits are set, then it will use the first one it finds.

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Received on 2010-01-25