Esempio n. 1
0
PUBLIC int ejsSetupHttpTrace(Ejs *ejs, HttpTrace *trace, EjsObj *options)
{
    EjsObj      *rx, *tx;

    if ((rx = ejsGetPropertyByName(ejs, options, EN("rx"))) != 0) {
        setupTrace(ejs, trace, HTTP_TRACE_RX, rx);
    }
    if ((tx = ejsGetPropertyByName(ejs, options, EN("tx"))) != 0) {
        setupTrace(ejs, trace, HTTP_TRACE_TX, tx);
    }
    return 0;
}
Esempio n. 2
0
static void
createServer(struct _TServer ** const srvPP,
             bool               const noAccept,
             TChanSwitch *      const chanSwitchP,
             bool               const userChanSwitch,
             unsigned short     const portNumber,             
             const char **      const errorP) {

    struct _TServer * srvP;

    MALLOCVAR(srvP);

    if (srvP == NULL) {
        xmlrpc_asprintf(errorP,
                        "Unable to allocate space for server descriptor");
    } else {
        setupTrace(srvP);

        srvP->terminationRequested = false;

        initChanSwitchStuff(srvP, noAccept, chanSwitchP, userChanSwitch,
                            portNumber, errorP);

        if (!*errorP) {
            srvP->builtinHandlerP = HandlerCreate();
            if (!srvP->builtinHandlerP)
                xmlrpc_asprintf(errorP, "Unable to allocate space for "
                                "builtin handler descriptor");
            else {
                srvP->defaultHandler   = HandlerDefaultBuiltin;
                srvP->defaultHandlerContext = srvP->builtinHandlerP;

                srvP->name             = strdup("unnamed");
                srvP->logfilename      = NULL;
                srvP->keepalivetimeout = 15;
                srvP->keepalivemaxconn = 30;
                srvP->timeout          = 15;
                srvP->advertise        = TRUE;
                srvP->useSigchld       = FALSE;
                srvP->uriHandlerStackSize = 0;
                srvP->maxConn          = 15;
                srvP->maxConnBacklog   = 15;
            
                initUnixStuff(srvP);

                ListInitAutoFree(&srvP->handlers);

                srvP->logfileisopen = FALSE;
                
                *errorP = NULL;

                if (*errorP)
                    HandlerDestroy(srvP->builtinHandlerP);
            }
        }        
        if (*errorP)
            free(srvP);
    }
    *srvPP = srvP;
}
Esempio n. 3
0
void Handle::setPerformanceTrace(const PerformanceTrace &trace)
{
    m_performanceTrace = trace;
    setupTrace();
}
Esempio n. 4
0
void Handle::setSQLTrace(const SQLTrace &trace)
{
    m_sqlTrace = trace;
    setupTrace();
}