Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
uWSGI 0.9.5beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto@sirius committed Mar 12, 2010
1 parent 09bc058 commit 86d28b2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ PyObject *uwsgi_send_message(const char *host, int port, uint8_t modifier1, uint
uws_addr.sin_port = htons(port);
uws_addr.sin_addr.s_addr = inet_addr(host);

UWSGI_SET_BLOCKING;

if (timed_connect(&uwsgi_mpoll, (const struct sockaddr *) &uws_addr, sizeof(struct sockaddr_in), timeout)) {
perror("connect()");
Expand Down Expand Up @@ -176,10 +177,13 @@ PyObject *uwsgi_send_message(const char *host, int port, uint8_t modifier1, uint


if (!uwsgi_parse_response(&uwsgi_mpoll, timeout, &uh, buffer)) {
UWSGI_UNSET_BLOCKING;
Py_INCREF(Py_None);
return Py_None;
}

UWSGI_UNSET_BLOCKING;

close(uwsgi_mpoll.fd);

if (uh.modifier1 == UWSGI_MODIFIER_RESPONSE) {
Expand Down
9 changes: 7 additions & 2 deletions uwsgi_pymodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,20 @@ PyObject *py_uwsgi_lock(PyObject * self, PyObject * args) {
#else
if (uwsgi.numproc > 1 && uwsgi.mypid != uwsgi.workers[0].pid) {
#endif
UWSGI_LOCK}
UWSGI_LOCK
UWSGI_SET_LOCKING;
}

Py_INCREF(Py_None);
return Py_None;
}

PyObject *py_uwsgi_unlock(PyObject * self, PyObject * args) {

UWSGI_UNLOCK Py_INCREF(Py_None);
UWSGI_UNLOCK
UWSGI_UNSET_LOCKING;

Py_INCREF(Py_None);
return Py_None;
}

Expand Down
4 changes: 4 additions & 0 deletions uwsgiconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
PROFILER=True
NAGIOS=True
PROXY=True
MINTERPRETERS=True
PLUGINS = []
UWSGI_BIN_NAME = 'uwsgi'
GCC='gcc'
Expand Down Expand Up @@ -114,6 +115,9 @@ def parse_vars():
if MULTICAST:
cflags.append("-DUWSGI_MULTICAST")

if MINTERPRETERS:
cflags.append("-DUWSGI_MINTERPRETERS")

if NAGIOS:
cflags.append("-DUWSGI_NAGIOS")

Expand Down

0 comments on commit 86d28b2

Please sign in to comment.