ret = LBER_SBIOD_READ_NEXT( sbiod, buf, len );
if (sbiod->sbiod_sb->sb_debug & LDAP_DEBUG_PACKETS)
{
+ int err = errno;
if ( ret < 0 ) {
- int err = errno;
ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
"%sread: want=%ld error=%s\n", (char *)sbiod->sbiod_pvt,
(long)len, STRERROR( errno ) );
- errno = err;
} else {
ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
"%sread: want=%ld, got=%ld\n", (char *)sbiod->sbiod_pvt,
ber_log_bprint( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
(const char *)buf, ret );
}
+ errno = err;
}
return ret;
}
ret = LBER_SBIOD_WRITE_NEXT( sbiod, buf, len );
if (sbiod->sbiod_sb->sb_debug & LDAP_DEBUG_PACKETS)
{
+ int err = errno;
if ( ret < 0 ) {
- int err = errno;
ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
"%swrite: want=%ld error=%s\n",
(char *)sbiod->sbiod_pvt, (long)len,
ber_log_bprint( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
(const char *)buf, ret );
}
+ errno = err;
}
return ret;