From f7475887dcc077fefd2526c7416b841f18d2b015 Mon Sep 17 00:00:00 2001 From: csoler Date: Mon, 20 Jul 2009 19:28:16 +0000 Subject: [PATCH] suppressed some debugging code git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1393 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/pqistreamer.cc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/libretroshare/src/pqi/pqistreamer.cc b/libretroshare/src/pqi/pqistreamer.cc index 23b14c355..bb4a44b19 100644 --- a/libretroshare/src/pqi/pqistreamer.cc +++ b/libretroshare/src/pqi/pqistreamer.cc @@ -308,6 +308,11 @@ int pqistreamer::queue_outpqi(RsItem *pqi) // This is called by different threads, and by threads that are not the handleoutgoing thread, // so it should be protected by a mutex !! + if(dynamic_cast(pqi)!=NULL && (bio_flags & BIN_FLAGS_NO_DELETE)) + { + std::cerr << "Having file data with flags = " << bio_flags << std::endl ; + *(int*)0x0=1 ; + } { std::ostringstream out; @@ -642,8 +647,7 @@ continue_packet: { void *extradata = (void *) (((char *) block) + blen); int tmplen ; - memset((void*)( &(((unsigned char *)block)[blen])),0,extralen) ; // reset the block, to avoid uninitialized memory reads. - +// memset((void*)( &(((unsigned char *)block)[blen])),0,extralen) ; // reset the block, to avoid uninitialized memory reads. memset( extradata,0,extralen ) ; // for checking later if (extralen != (tmplen = bio->readdata(extradata, extralen))) @@ -720,13 +724,13 @@ continue_packet: uint32_t pktlen = blen+extralen ; // std::cerr << "deserializing. Size=" << pktlen << std::endl ; - if(pktlen == 17306) - { - FILE *f = fopen("dbug.packet.bin","w"); - fwrite(block,pktlen,1,f) ; - fclose(f) ; - exit(-1) ; - } +// if(pktlen == 17306) +// { +// FILE *f = fopen("dbug.packet.bin","w"); +// fwrite(block,pktlen,1,f) ; +// fclose(f) ; +// exit(-1) ; +// } RsItem *pkt = rsSerialiser->deserialise(block, &pktlen); if ((pkt != NULL) && (0 < handleincomingitem(pkt)))