Branch: Tag:

1999-12-28

1999-12-28 01:39:33 by Martin Nilsson <mani@lysator.liu.se>

Debug code fixes

Rev: server/base_server/configuration.pike:1.247
Rev: server/base_server/slowpipe.pike:1.6
Rev: server/base_server/smartpipe.pike:1.31
Rev: server/base_server/socket.pike:1.18
Rev: server/base_server/supports.pike:1.4
Rev: server/base_server/throttler.pike:1.4
Rev: server/base_server/wizard.pike:1.107

3:    * (C) 1996, 1999 Idonex AB.    */    - constant cvs_version = "$Id: configuration.pike,v 1.246 1999/12/28 00:00:17 mast Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.247 1999/12/28 01:23:44 nilsson Exp $";   constant is_configuration = 1;   #include <module.h>   #include <roxen.h>
23: Inside #if defined(THROTTLING_DEBUG)
     #ifdef THROTTLING_DEBUG   #undef THROTTLING_DEBUG - #define THROTTLING_DEBUG(X) perror("Throttling: "+X+"\n") + #define THROTTLING_DEBUG(X) werror("Throttling: "+X+"\n")   #else   #define THROTTLING_DEBUG(X)   #endif    -  + #ifdef REQUEST_DEBUG + # define REQUEST_WERR(X) werror("CONFIG: "+X+"\n") + #else + # define REQUEST_WERR(X) + #endif +    /* A configuration.. */      #include "rxml.pike";
331:    error = catch(m=mod[fun](@args));    if(arrayp(error)) {    error[0] = "Error in map_providers(): "+error[0]; -  roxen_perror(describe_backtrace(error)); +  report_debug(describe_backtrace(error));    }    else    a += ({ m });
1031: Inside #if defined(THREADS)
   {    // Allow recursive locks.    catch{ -  //perror("lock %O\n", f); +  //werror("lock %O\n", f);    locked[f]++;    key = l();    };
1049: Inside #if defined(THREADS)
   locks[f]=l;    }    } -  //perror("lock %O\n", f); +  //werror("lock %O\n", f);    locked[f]++;    key = l();    }
1476:    function funp;    mixed file;    - #ifdef REQUEST_DEBUG -  werror("CONFIG: handle_request()\n"); - #endif /* REQUEST_DEBUG */ +  REQUEST_WERR("handle_request()");    foreach(first_modules(id), funp)    {    if(file = funp( id ))    break;    if(id->conf != this_object()) { - #ifdef REQUEST_DEBUG -  werror("CONFIG: handle_request(): Redirected (2)\n"); - #endif /* REQUEST_DEBUG */ +  REQUEST_WERR("handle_request(): Redirected (2)");    return id->conf->handle_request(id);    }    }
1495:    mixed ret;    foreach(last_modules(id), funp) if(ret = funp(id)) break;    if (ret == 1) { - #ifdef REQUEST_DEBUG -  werror("CONFIG: handle_request(): Recurse\n"); - #endif /* REQUEST_DEBUG */ +  REQUEST_WERR("handle_request(): Recurse");    return handle_request(id);    }    file = ret;    } - #ifdef REQUEST_DEBUG -  werror("CONFIG: handle_request(): Done\n"); - #endif /* REQUEST_DEBUG */ +  REQUEST_WERR("handle_request(): Done");    return file;   }   
1876: Inside #if defined(URL_MODULES)
   {    id->not_query=of;   #ifdef MODULE_DEBUG -  roxen_perror(sprintf("conf->find_dir_stat(\"%s\"): url_module returned mapping:%O\n", -  file, tmp)); +  werror("conf->find_dir_stat(\"%s\"): url_module returned mapping:%O\n", +  file, tmp);   #endif /* MODULE_DEBUG */    TRACE_LEAVE(LOCALE->returned_mapping()+sprintf("%O", tmp));    TRACE_LEAVE("");
1902: Inside #if defined(URL_MODULES)
   if(err)    throw(err);   #ifdef MODULE_DEBUG -  roxen_perror(sprintf("conf->find_dir_stat(\"%s\"): url_module returned object:\n", -  file)); +  werror("conf->find_dir_stat(\"%s\"): url_module returned object:\n", +  file);   #endif /* MODULE_DEBUG */    TRACE_LEAVE(LOCALE->returned_object());    TRACE_LEAVE(LOCALE->returning_it());