Changeset 446:8030b9729a38

Show
Ignore:
Timestamp:
07/29/10 10:19:06 (38 hours ago)
Author:
roberto@…
Branch:
default
Tags:
tip
Message:

fix UNBIT compilation

Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • uwsgi.c

    r445 r446  
    174174 
    175175 
    176 static int unconfigured_hook(struct uwsgi_server *uwsgi, struct wsgi_request *wsgi_req) { 
     176int unconfigured_hook(struct uwsgi_server *uwsgi, struct wsgi_request *wsgi_req) { 
    177177        uwsgi_log("-- unavailable modifier requested: %d --\n", wsgi_req->uh.modifier1); 
    178178        return -1; 
     
    224224 
    225225#ifdef UNBIT 
    226         struct uidsec_struct us; 
     226        //struct uidsec_struct us; 
    227227#endif 
    228228 
     
    12771277                                // checking logsize 
    12781278                                if (uwsgi.logfile) { 
    1279                                         uwsgi_log("LOGSIZE: %d\n", lseek(2, 0, SEEK_CUR)); 
     1279                                        uwsgi.shared->logsize = lseek(2, 0, SEEK_CUR); 
    12801280                                } 
    12811281                                 
     
    24272427                } 
    24282428        } 
     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         
    24292437 
    24302438        if (PyDict_SetItemString(uwsgi.embedded_dict, "SPOOL_RETRY", PyInt_FromLong(17))) { 
  • uwsgi.h

    r444 r446  
    681681        struct uwsgi_cluster_node nodes[MAX_CLUSTER_NODES]; 
    682682 
     683        off_t logsize; 
     684 
    683685#ifdef UWSGI_SPOOLER 
    684686        pid_t spooler_pid; 
     
    10341036 
    10351037void http_loop(struct uwsgi_server *); 
     1038 
     1039int unconfigured_hook(struct uwsgi_server *, struct wsgi_request *); 
  • uwsgi_pymodule.c

    r441 r446  
    626626#endif 
    627627 
     628PyObject *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 
    628644PyObject *py_uwsgi_send_message(PyObject * self, PyObject * args) { 
    629645 
     
    815831PyObject *py_uwsgi_worker_id(PyObject * self, PyObject * args) { 
    816832        return PyInt_FromLong(uwsgi.mywid); 
     833} 
     834 
     835PyObject *py_uwsgi_logsize(PyObject * self, PyObject * args) { 
     836        return PyInt_FromLong(uwsgi.shared->logsize); 
    817837} 
    818838 
     
    919939        {"set_warning_message", py_uwsgi_warning, METH_VARARGS, ""}, 
    920940        {"mem", py_uwsgi_mem, METH_VARARGS, ""}, 
     941        {"has_hook", py_uwsgi_has_hook, METH_VARARGS, ""}, 
     942        {"logsize", py_uwsgi_logsize, METH_VARARGS, ""}, 
    921943#ifdef UWSGI_MULTICAST 
    922944        {"send_multicast_message", py_uwsgi_multicast, METH_VARARGS, ""}, 
  • uwsgiconfig.py

    r444 r446  
    325325 
    326326        if UNBIT: 
    327                 cflags.append("-DUWSGI_UNBIT") 
     327                cflags.append("-DUNBIT") 
    328328 
    329329def build_plugin(path):