Re: Re: Bug in wire_read() of cvsgui_protocol\cvsgui_wire.cpp
Karl-Heinz BrĂ¼nen <[email protected]> Fri, 21 Jul 2006 01:09:13 +0200
| Newsgroups | gmane.comp.version-control.cvs.gui.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Jerzy, Am Donnerstag, 20. Juli 2006 01:45 schrieb kaczoroj: > Arthur, > > The signature of wire used to be: > int wire_read(pipe_t fd, guint8 *buf, gulong count, gulong& rcount) > > But on July 15 Karl did the changes for gcvs compilation which > resulted in: > int wire_read(pipe_t fd, guint8 *buf, gulong count, gulong *rcount) > okay, I forgot the '*'. It should be *rcount += totalcount; I will correct this. > That seems to be a newly introduced bug and must be fixed and all > other places checked carefully. It's not a bug. It's a feature ;) All jokes aside. Would should 'gulong& rcount' do? AFAIK, you want to get the adress of 'rcount' to manipulate it direct. So where is the bug. That is what the code is doing. If I miss something feel free to give me an advice. Best Regards, Kalle PS.: Don't call me 'Karl', It sounds like an old man :D > > BTW, what are still doing with VS.NET 2003? Upgrade to VS2005. 2003 > is a mere alpha quality while 2005 is already reaching beta > quality! ;) > > Best Regards, > Jerzy > > --- In [email protected], "Arthur > > Barrett" <arthur.barrett@...> wrote: > > Hi all, > > > > Think I've found the reason why processes don't always seem to > > terminate > > > properly when WinCVS is compiled with VS.NET 2003. > > > > At the end of wire_read() in the source cvsgui_protocol/ > > cvsgui_wire.cpp > > > there is this line to pass back to the caller how many bytes have > > been > > > read: > > rcount += totalcount; > > > > rcount is a pointer to type gulong (more or less int I think). > > > > The problem is that this statement actually increments the pointer, > > not > > > the contents of the pointer. I think it is supposed to be: > > > > *rcount += totalcount; > > > > The pointer rcount is passed all the way down from > > cvsgui_process.cpp > > > and ServeProtocol() which ends up in a loop because totalBytesAvail > > never decreases. > > > > HTH. > > > > Arthur > > > > Yahoo! Groups Links > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/NhFolB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/cvsgui-dev/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/