Revision: 567
          http://sourceforge.net/p/vde/svn/567
Author:   rd235
Date:     2014-01-15 11:12:28 +0000 (Wed, 15 Jan 2014)
Log Message:
-----------
vdetelweb: wrong char count on write+it looped if the switch terminated during 
svdetelweb startup

Modified Paths:
--------------
    trunk/ipn/af_ipn.c
    trunk/vdetelweb/vdetelweb.c
    trunk/vdetelweb/web.c

Modified: trunk/ipn/af_ipn.c
===================================================================
--- trunk/ipn/af_ipn.c  2014-01-10 15:05:41 UTC (rev 566)
+++ trunk/ipn/af_ipn.c  2014-01-15 11:12:28 UTC (rev 567)
@@ -1577,6 +1577,8 @@
        spin_lock(&ipn_node->msglock);
        while (ipn_node->totmsgcount == 0) {
                spin_unlock(&ipn_node->msglock);
+               if (flags & MSG_DONTWAIT)
+                       return -EWOULDBLOCK;
                if (wait_event_interruptible(ipn_node->read_wait,
                                        !(ipn_node->totmsgcount == 0)))
                        return -ERESTARTSYS;

Modified: trunk/vdetelweb/vdetelweb.c
===================================================================
--- trunk/vdetelweb/vdetelweb.c 2014-01-10 15:05:41 UTC (rev 566)
+++ trunk/vdetelweb/vdetelweb.c 2014-01-15 11:12:28 UTC (rev 567)
@@ -221,7 +221,7 @@
        if ((ctrl=rindex(buf,'\n')) != NULL)
                *ctrl=0;
        banner=strdup(buf);
-       write(fd,"ds/showinfo\n",13);
+       write(fd,"ds/showinfo\n",12);
        if ((n=read(fd,buf,BUFSIZE))<=0) {
                printlog(LOG_ERR,"Error reading ctl socket from VDE switch: 
%s",strerror(errno));
                exit(-1);

Modified: trunk/vdetelweb/web.c
===================================================================
--- trunk/vdetelweb/web.c       2014-01-10 15:05:41 UTC (rev 566)
+++ trunk/vdetelweb/web.c       2014-01-15 11:12:28 UTC (rev 567)
@@ -169,6 +169,8 @@
        int n=0,ib=0,il=0,indata=0,eoa=0;
        do {
                n=read(vdefd,buf,BUFSIZE);
+               if (n==0)
+                       exit(0);
                for(ib=0;ib<n;ib++)
                {
                        linebuf[il++]=buf[ib];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
vde-users mailing list
vde-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vde-users

Reply via email to