[cvsnt] bug in cvsapi/unix/SocketIO.cpp in

William Lott cvsntmail at wlott.org
Sun Oct 9 02:05:11 BST 2005

Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.

I recently set out to move my CVSNT server and repository from the WinXP 
machine they have been on for several years to a Linux (Fedora Core 4 -- 
not that it matters) machine.  But the lock server from both the 
precompiled .rpm and compiling it myself crashes with a seg fault at 
startup.  Turns out that CSocketIO::select in cvsapi/unix/SocketIO.cpp 
is trying to use "n" for two different variables in the same scope.  I 
could be wrong, but I'm pretty sure you can't do that.  :-)

-William Lott
cvsntmail at wlott.org

--- SocketIO.cpp.~    2005-10-02 08:37:59.000000000 -0700
+++ SocketIO.cpp        2005-10-08 17:34:39.000000000 -0700
@@ -323,13 +323,13 @@

-               for(size_t n=0; n<socks[n]->m_sockets.size(); n++)
+               for(size_t j=0; j<socks[n]->m_sockets.size(); j++)
-                       if(socks[n]->m_sockets[n]==-1)
+                       if(socks[n]->m_sockets[j]==-1)
-                       FD_SET(socks[n]->m_sockets[n],&rfd);
-                       if(socks[n]->m_sockets[n]>maxdesc)
-                               maxdesc=socks[n]->m_sockets[n];
+                       FD_SET(socks[n]->m_sockets[j],&rfd);
+                       if(socks[n]->m_sockets[j]>maxdesc)
+                               maxdesc=socks[n]->m_sockets[j];

@@ -340,7 +340,7 @@

        for(size_t n=0; n<count; n++)
-               for(size_t j=0; n<socks[n]->m_sockets.size(); j++)
+               for(size_t j=0; j<socks[n]->m_sockets.size(); j++)

More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook