add an assert to help debugging

This commit is contained in:
Daniel Stenberg 2009-05-24 23:44:23 +02:00
parent fdaa5ad5b4
commit fdc043e7b1

View File

@ -45,6 +45,7 @@
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include <assert.h>
#include "channel.h"
#include "transport.h"
@ -2435,6 +2436,8 @@ int _libssh2_channel_free(LIBSSH2_CHANNEL *channel)
unsigned long data_len;
int rc;
assert(session);
if (channel->free_state == libssh2_NB_state_idle) {
_libssh2_debug(session, LIBSSH2_DBG_CONN,
"Freeing channel %lu/%lu resources", channel->local.id,