git-svn-id: http://svn.openzap.org/svn/openzap/trunk@251 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Anthony Minessale
2007-06-13 03:37:55 +00:00
parent ecdc267112
commit 18ac09fb0d
7 changed files with 245 additions and 21 deletions

View File

@@ -781,9 +781,12 @@ zap_status_t zap_channel_close(zap_channel_t **zchan)
assert(zchan != NULL);
check = *zchan;
assert(check != NULL);
*zchan = NULL;
if (!check) {
return ZAP_FAIL;
}
zap_mutex_lock(check->mutex);
if (zap_test_flag(check, ZAP_CHANNEL_OPEN)) {
status = check->zio->close(check);
@@ -1966,7 +1969,7 @@ void print_bits(uint8_t *b, int bl, char *buf, int blen, zap_endian_t e, uint8_t
if (blen < (bl * 10) + 2) {
return;
}
zap_bitstream_init(&bs, b, bl, e, ss);
last = bs.byte_index;
while((bit = zap_bitstream_get_bit(&bs)) > -1) {