##// END OF EJS Templates
Fixed Memory leak, GERSB still W.I.P.
Jeandet Alexis -
r77:9bf6663d5c21 GRESB
parent child
Show More
@@ -139,7 +139,7 unsigned int GR_ESB_bridge::Write(unsign
139 139 RMAP_MAX_XFER_SIZE*4,
140 140 writeBuffer);
141 141 manager->sendPacket(writeBuffer,RMAP_WRITE_PACKET_MIN_SZ(RMAP_MAX_XFER_SIZE*4));
142 int len = manager->getRMAPanswer(transactionID,&RMAPAckBuff);
142 manager->getRMAPanswer(transactionID,&RMAPAckBuff);
143 143 free(RMAPAckBuff);
144 144 written+=RMAP_MAX_XFER_SIZE;
145 145 count-=RMAP_MAX_XFER_SIZE;
@@ -166,7 +166,7 unsigned int GR_ESB_bridge::Write(unsign
166 166 count*4,
167 167 writeBuffer);
168 168 manager->sendPacket(writeBuffer,RMAP_WRITE_PACKET_MIN_SZ(count*4));
169 int len = manager->getRMAPanswer(transactionID,&RMAPAckBuff);
169 manager->getRMAPanswer(transactionID,&RMAPAckBuff);
170 170 free(RMAPAckBuff);
171 171 written+=count;
172 172 if(progress!=NULL)
@@ -224,8 +224,11 unsigned int GR_ESB_bridge::Read(unsigne
224 224 free(RMAP_AnswerBuffer);
225 225 read+=RMAP_MAX_XFER_SIZE;
226 226 count-=RMAP_MAX_XFER_SIZE;
227 progress->setValue(read);
228 qApp->processEvents();
227 if(progress!=NULL)
228 {
229 progress->setValue(read);
230 qApp->processEvents();
231 }
229 232 }
230 233 if((int)count>0)
231 234 {
@@ -481,11 +484,12 bool GR_ESB_Manager::sendPacket(char *pa
481 484 SPWpacket[1]=(size>>16) & 0x0FF;
482 485 SPWpacket[2]=(size>>8) & 0x0FF;
483 486 SPWpacket[3]=size & 0x0FF;
487 this->handleMutex->lock();
488 result = ((size+4) == this->Write_soc.write(SPWpacket,size+4));
489 this->Write_soc.flush();
490 this->handleMutex->unlock();
491 free(SPWpacket);
484 492 }
485 this->handleMutex->lock();
486 result = ((size+4) == this->Write_soc.write(SPWpacket,size+4));
487 this->Write_soc.flush();
488 this->handleMutex->unlock();
489 493 if (Q_UNLIKELY(!result))
490 494 {
491 495 SocExplorerEngine::message(this->plugin,"ERR sending the READ command ",2);
@@ -215,8 +215,11 unsigned int stardundeeSPW_USB::Read(uns
215 215 free(RMAP_AnswerBuffer);
216 216 read+=RMAP_MAX_XFER_SIZE;
217 217 count-=RMAP_MAX_XFER_SIZE;
218 progress->setValue(read);
219 qApp->processEvents();
218 if(progress!=NULL)
219 {
220 progress->setValue(read);
221 qApp->processEvents();
222 }
220 223 }
221 224 if((int)count>0)
222 225 {
@@ -855,7 +858,7 void stardundeeSPW_USB_Manager::initiali
855 858 unsigned int stardundeeSPW_USB_Manager::getLinkStatus(unsigned char link)
856 859 {
857 860 U32 statusControl, errorStatus, portType;
858 U32 linkStatus, operatingSpeed, outputPortConnection;
861 U32 linkStatus=0, operatingSpeed, outputPortConnection;
859 862 char isLinkRunning, isAutoStart, isStart, isDisabled, isTristate;
860 863
861 864 // Read the link status control register
General Comments 0
You need to be logged in to leave comments. Login now