Changeset 446:8030b9729a38
- Timestamp:
- 07/29/10 10:19:06 (38 hours ago)
- Author:
- roberto@…
- Branch:
- default
- Tags:
- tip
- Message:
-
fix UNBIT compilation
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r445
|
r446
|
|
| 174 | 174 | |
| 175 | 175 | |
| 176 | | static int unconfigured_hook(struct uwsgi_server *uwsgi, struct wsgi_request *wsgi_req) { |
| | 176 | int unconfigured_hook(struct uwsgi_server *uwsgi, struct wsgi_request *wsgi_req) { |
| 177 | 177 | uwsgi_log("-- unavailable modifier requested: %d --\n", wsgi_req->uh.modifier1); |
| 178 | 178 | return -1; |
| … |
… |
|
| 224 | 224 | |
| 225 | 225 | #ifdef UNBIT |
| 226 | | struct uidsec_struct us; |
| | 226 | //struct uidsec_struct us; |
| 227 | 227 | #endif |
| 228 | 228 | |
| … |
… |
|
| 1277 | 1277 | // checking logsize |
| 1278 | 1278 | if (uwsgi.logfile) { |
| 1279 | | uwsgi_log("LOGSIZE: %d\n", lseek(2, 0, SEEK_CUR)); |
| | 1279 | uwsgi.shared->logsize = lseek(2, 0, SEEK_CUR); |
| 1280 | 1280 | } |
| 1281 | 1281 | |
| … |
… |
|
| 2427 | 2427 | } |
| 2428 | 2428 | } |
| | 2429 | |
| | 2430 | if (uwsgi.pidfile) { |
| | 2431 | if (PyDict_SetItemString(uwsgi.embedded_dict, "pidfile", PyString_FromString(uwsgi.pidfile))) { |
| | 2432 | PyErr_Print(); |
| | 2433 | exit(1); |
| | 2434 | } |
| | 2435 | } |
| | 2436 | |
| 2429 | 2437 | |
| 2430 | 2438 | if (PyDict_SetItemString(uwsgi.embedded_dict, "SPOOL_RETRY", PyInt_FromLong(17))) { |
-
|
r444
|
r446
|
|
| 681 | 681 | struct uwsgi_cluster_node nodes[MAX_CLUSTER_NODES]; |
| 682 | 682 | |
| | 683 | off_t logsize; |
| | 684 | |
| 683 | 685 | #ifdef UWSGI_SPOOLER |
| 684 | 686 | pid_t spooler_pid; |
| … |
… |
|
| 1034 | 1036 | |
| 1035 | 1037 | void http_loop(struct uwsgi_server *); |
| | 1038 | |
| | 1039 | int unconfigured_hook(struct uwsgi_server *, struct wsgi_request *); |
-
|
r441
|
r446
|
|
| 626 | 626 | #endif |
| 627 | 627 | |
| | 628 | PyObject *py_uwsgi_has_hook(PyObject * self, PyObject * args) { |
| | 629 | int modifier1; |
| | 630 | |
| | 631 | if (!PyArg_ParseTuple(args, "i:has_hook", &modifier1)) { |
| | 632 | return NULL; |
| | 633 | } |
| | 634 | |
| | 635 | if (uwsgi.shared->hooks[modifier1] != unconfigured_hook) { |
| | 636 | Py_INCREF(Py_True); |
| | 637 | return Py_True; |
| | 638 | } |
| | 639 | |
| | 640 | Py_INCREF(Py_None); |
| | 641 | return Py_None; |
| | 642 | } |
| | 643 | |
| 628 | 644 | PyObject *py_uwsgi_send_message(PyObject * self, PyObject * args) { |
| 629 | 645 | |
| … |
… |
|
| 815 | 831 | PyObject *py_uwsgi_worker_id(PyObject * self, PyObject * args) { |
| 816 | 832 | return PyInt_FromLong(uwsgi.mywid); |
| | 833 | } |
| | 834 | |
| | 835 | PyObject *py_uwsgi_logsize(PyObject * self, PyObject * args) { |
| | 836 | return PyInt_FromLong(uwsgi.shared->logsize); |
| 817 | 837 | } |
| 818 | 838 | |
| … |
… |
|
| 919 | 939 | {"set_warning_message", py_uwsgi_warning, METH_VARARGS, ""}, |
| 920 | 940 | {"mem", py_uwsgi_mem, METH_VARARGS, ""}, |
| | 941 | {"has_hook", py_uwsgi_has_hook, METH_VARARGS, ""}, |
| | 942 | {"logsize", py_uwsgi_logsize, METH_VARARGS, ""}, |
| 921 | 943 | #ifdef UWSGI_MULTICAST |
| 922 | 944 | {"send_multicast_message", py_uwsgi_multicast, METH_VARARGS, ""}, |
-
|
r444
|
r446
|
|
| 325 | 325 | |
| 326 | 326 | if UNBIT: |
| 327 | | cflags.append("-DUWSGI_UNBIT") |
| | 327 | cflags.append("-DUNBIT") |
| 328 | 328 | |
| 329 | 329 | def build_plugin(path): |