Quick fix to get hex output of D-Channel traffic in ozmod_libpri. Remove the comment chars in front of the #define IODEBUG to enable it (compile time tested only)

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@703 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Stefan Knoblich 2009-03-31 22:11:40 +00:00
parent 9f892711a5
commit 391201452a

View File

@ -31,6 +31,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//#define IODEBUG
#include "openzap.h"
#include "lpwrap_pri.h"
#ifndef HAVE_GETTIMEOFDAY
@ -123,8 +125,14 @@ static int __pri_lpwrap_read(struct pri *pri, void *buf, int buflen)
memset(&((unsigned char*)buf)[res],0,2);
res+=2;
//print_bits(buf, res-2, bb, sizeof(bb), 1, 0);
//zap_log(ZAP_LOG_DEBUG, "READ %d\n", res-2);
#ifdef IODEBUG
{
char bb[2048] = { 0 };
print_hex_bytes(buf, res - 2, bb, sizeof(bb));
zap_log(ZAP_LOG_DEBUG, "READ %d\n", res-2);
}
#endif
return res;
}
@ -140,8 +148,14 @@ static int __pri_lpwrap_write(struct pri *pri, void *buf, int buflen)
return -1;
}
//print_bits(buf, (int)buflen-2, bb, sizeof(bb), 1, 0);
//zap_log(ZAP_LOG_DEBUG, "WRITE %d\n", (int)buflen-2);
#ifdef IODEBUG
{
char bb[2048] = { 0 };
print_hex_bytes(buf, buflen - 2, bb, sizeof(bb));
zap_log(ZAP_LOG_DEBUG, "WRITE %d\n", (int)buflen-2);
}
#endif
return (int) buflen;
}