Il giorno 03/set/2012, alle ore 19:48, Jeff Van Voorst <[email protected]> ha scritto:
> Hi, > > With a few corrections, I got my setup to work with the development > repository (1.3). I don't necessarily have the time to figure out what I was > doing wrong with the 1.2 series of uWSGI. However, in my case, it is > acceptable to run the development uWSGI in my environment. > > I had used a similar idea as you did to buffer the data, but I still was > having trouble reading it in the remote uWSGI instances (the routing uWSGI > did write the data to the socket based on the return value, but I could only > read the headers and not the content on the remote uWSGI). It might also be > the case that I made too many changes and just need to start over with a > fresh checkout of 1.2 ... > > Thanks for your help. > > --Jeff Van Voorst > > # HG changeset patch > # User Jeff Van_Voorst <[email protected]> > # Date 1346694125 18000 > # Node ID 3651afab092035aeebdafad0da219d9984a34085 > # Parent b33f027d10dd1a78e1871fe28cfb6d7b37474df0 > Repaired size_t initialized with -1 and parameters order in function call > > diff -r b33f027d10dd -r 3651afab0920 core/protocol.c > --- a/core/protocol.c Sat Sep 01 11:42:42 2012 +0200 > +++ b/core/protocol.c Mon Sep 03 12:42:05 2012 -0500 > @@ -475,7 +475,7 @@ > > // transfer data from one socket to another > if (pfd >= 0 && plen > 0) { > - ret = uwsgi_pipe_sized(pfd, fd, timeout, plen); > + ret = uwsgi_pipe_sized(pfd, fd, plen, timeout); > if (ret < 0) return -1; > } > > diff -r b33f027d10dd -r 3651afab0920 core/utils.c > --- a/core/utils.c Sat Sep 01 11:42:42 2012 +0200 > +++ b/core/utils.c Mon Sep 03 12:42:05 2012 -0500 > @@ -4602,7 +4602,7 @@ > > ssize_t uwsgi_pipe_sized(int src, int dst, size_t required, int timeout) { > char buf[8192]; > - size_t written = -1; > + size_t written = 0; > ssize_t len; > > while(written < required) { > > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi Applied your patch, thanks -- Roberto De Ioris http://unbit.it JID: [email protected] _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
