You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(38) |
Sep
(134) |
Oct
(30) |
Nov
(8) |
Dec
(17) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
(14) |
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
2009 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Gonzalo A. <ga...@us...> - 2010-01-08 12:25:23
|
Update of /cvsroot/mod-c/mod_c/src In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv15222/src Modified Files: mod_c.c Log Message: Shifted the message "The file to open: " to debug (was 'info' priority). Index: mod_c.c =================================================================== RCS file: /cvsroot/mod-c/mod_c/src/mod_c.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** mod_c.c 1 Apr 2007 13:25:55 -0000 1.34 --- mod_c.c 8 Jan 2010 12:21:37 -0000 1.35 *************** *** 105,109 **** // We must handle this request ! RINFO(r, "The file to open: '%s'", r->filename); config = c_sconfig(r->server); dir_config = c_dconfig(r); --- 105,109 ---- // We must handle this request ! RDEBUG(r, "The file to open: '%s'", r->filename); config = c_sconfig(r->server); dir_config = c_dconfig(r); |
From: Gonzalo A. <ga...@us...> - 2009-06-02 17:18:50
|
Update of /cvsroot/mod-c/ehtml/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv23541/src Modified Files: EHTMLApplication.cpp Log Message: Do not start sessions if EHTMLSessions is off. Index: EHTMLApplication.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/EHTMLApplication.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** EHTMLApplication.cpp 13 Jan 2009 17:21:06 -0000 1.22 --- EHTMLApplication.cpp 2 Jun 2009 17:18:46 -0000 1.23 *************** *** 117,122 **** { ProfileMe(); driver = SessionDriver::Selected(); ! if (driver != NULL) { driver->Application(this); if (!driver->Connect()) --- 117,124 ---- { ProfileMe(); + driver = SessionDriver::Selected(); ! if (RequestContext->dir_config && RequestContext->dir_config->sessions) { ! assert (driver != NULL); driver->Application(this); if (!driver->Connect()) |
From: Gonzalo A. <ga...@us...> - 2009-01-26 14:00:49
|
Update of /cvsroot/mod-c/ehtml/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16309/src Modified Files: Response.cpp Log Message: Bugfix: Set-Cookie header may happend multiple times in the response. Index: Response.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/Response.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Response.cpp 12 Oct 2006 21:10:36 -0000 1.6 --- Response.cpp 26 Jan 2009 14:00:44 -0000 1.7 *************** *** 44,48 **** ProfileMe(); string val(name + "=" + value + "; path=/"); ! apr_table_set(RequestContext->r->headers_out, "Set-Cookie", val.c_str()); } --- 44,48 ---- ProfileMe(); string val(name + "=" + value + "; path=/"); ! apr_table_add(RequestContext->r->headers_out, "Set-Cookie", val.c_str()); } |
From: Gonzalo A. <ga...@us...> - 2009-01-26 14:00:12
|
Update of /cvsroot/mod-c/ehtml/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16196/src Modified Files: Common.cpp Log Message: Remove bogus g++ warning (g++ bug?). Index: Common.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/Common.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Common.cpp 12 Mar 2007 23:04:35 -0000 1.18 --- Common.cpp 26 Jan 2009 14:00:04 -0000 1.19 *************** *** 265,270 **** return buf_len; } ! else ! return -1; } --- 265,270 ---- return buf_len; } ! ! return -1; } |
From: Gonzalo A. <ga...@us...> - 2009-01-13 17:21:16
|
Update of /cvsroot/mod-c/ehtml/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv18542/src Modified Files: EHTMLApplication.cpp Log Message: Fixed memleak. Index: EHTMLApplication.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/EHTMLApplication.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** EHTMLApplication.cpp 6 Dec 2006 15:30:01 -0000 1.21 --- EHTMLApplication.cpp 13 Jan 2009 17:21:06 -0000 1.22 *************** *** 70,73 **** --- 70,76 ---- APR_DEALLOCATE( RequestContext, Request, Request ); APR_DEALLOCATE( RequestContext, Response, Response ); + + if (session) + delete session; } |
From: Gonzalo A. <ga...@us...> - 2008-11-05 15:03:57
|
Update of /cvsroot/mod-c/ehtml/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27950/src Modified Files: Request.cpp Log Message: * Added a comment on the Cookie argument format. * Fixed support for variables spanning more than one buffer ending. Index: Request.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/Request.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Request.cpp 12 Mar 2007 23:14:43 -0000 1.29 --- Request.cpp 5 Nov 2008 15:03:48 -0000 1.30 *************** *** 222,225 **** --- 222,226 ---- s = skip_ws(s); } + // Name=Value (; (Comment|Domain|Max-Age|Path|Version|Expires)=value|Secure)* } *************** *** 272,275 **** --- 273,277 ---- char *aux = buf, *eol, *eop, *eo_name; bool is_file, again; + bool new_var = false; DEBUG_UPLOAD("ProcessUploadChunk: nbytes=%u boundary_length=%u", nbytes, boundary_length); if (nbytes < boundary_length) *************** *** 334,337 **** --- 336,340 ---- state = 'F'; } + new_var = true; case 'v': case 'F': *************** *** 351,357 **** DEBUG_UPLOAD("ProcessUploadChunk: state = %c: eop=\"%s\"", state, eop); if (state == 'v') { // variable ! DEBUG_UPLOAD("ProcessUploadChunk: \"%s\" += string(\"%s\",%d)", varname, aux, eop-aux); ! Arguments[varname] += string(aux,eop-aux); ! DEBUG_UPLOAD("ProcessUploadChunk: state = v: got variable \"%s\" => \"%s\"", varname, Arguments[varname].c_str()); } else { // file int fd = GetFile(varname); --- 354,364 ---- DEBUG_UPLOAD("ProcessUploadChunk: state = %c: eop=\"%s\"", state, eop); if (state == 'v') { // variable ! string val(aux,eop-aux); ! DEBUG_UPLOAD("ProcessUploadChunk: \"%s\" += \"%s\"", varname, val.c_str()); ! if (!new_var) ! Arguments[varname] += val; ! else ! Arguments.insert(pair<string,string>(varname, val)); ! DEBUG_UPLOAD("ProcessUploadChunk: state = v: got variable \"%s\" => \"%s\"", varname, val.c_str()); } else { // file int fd = GetFile(varname); |
From: Gonzalo A. <ga...@us...> - 2008-11-05 14:58:14
|
Update of /cvsroot/mod-c/ehtml/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27611/include Modified Files: MemBuf.h Log Message: Handle null'ed buffers. Index: MemBuf.h =================================================================== RCS file: /cvsroot/mod-c/ehtml/include/MemBuf.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MemBuf.h 12 Oct 2006 21:10:36 -0000 1.3 --- MemBuf.h 5 Nov 2008 14:58:09 -0000 1.4 *************** *** 60,66 **** static MemBuf Dup(const void* p, size_t l); ! void* Buffer() { return _b->_buf; } const void* Buffer() const { return _b->_buf; } ! size_t Size() const { return _b->_size; } MemBuf& operator = (const MemBuf&); --- 60,66 ---- static MemBuf Dup(const void* p, size_t l); ! void* Buffer() { return _b ? _b->_buf : NULL; } const void* Buffer() const { return _b->_buf; } ! size_t Size() const { return _b ? _b->_size : 0; } MemBuf& operator = (const MemBuf&); |
From: Gonzalo A. <ga...@us...> - 2008-11-05 14:54:48
|
Update of /cvsroot/mod-c/mod_c/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27459/src Modified Files: Makefile.am Log Message: using apxs -a seems to be somewhat broken under apache 2.2 (debian). Index: Makefile.am =================================================================== RCS file: /cvsroot/mod-c/mod_c/src/Makefile.am,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Makefile.am 1 Apr 2007 13:25:08 -0000 1.17 --- Makefile.am 5 Nov 2008 14:54:43 -0000 1.18 *************** *** 23,26 **** install-exec-hook: ! $(APXS) -i -a mod_c.so --- 23,26 ---- install-exec-hook: ! $(APXS) -i mod_c.so |
From: Gonzalo A. <ga...@us...> - 2008-11-05 14:53:20
|
Update of /cvsroot/mod-c/mod_c/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27408/src Modified Files: lib_cache.cpp Log Message: Using RTLD_LAZY is not *that* wise. Expierence shows that it is better to get 'Undefined symbols' errors at startup, rather at each request. Index: lib_cache.cpp =================================================================== RCS file: /cvsroot/mod-c/mod_c/src/lib_cache.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lib_cache.cpp 1 Apr 2007 13:25:55 -0000 1.6 --- lib_cache.cpp 5 Nov 2008 14:53:13 -0000 1.7 *************** *** 64,68 **** int LoadEHTMLFile(const char* ehtml, ehtml_rec* e) { ! e->fileh = dlopen(ehtml, RTLD_LAZY); if (e->fileh == NULL) return -1; --- 64,68 ---- int LoadEHTMLFile(const char* ehtml, ehtml_rec* e) { ! e->fileh = dlopen(ehtml, RTLD_NOW); if (e->fileh == NULL) return -1; |
From: Gonzalo A. <ga...@us...> - 2007-08-02 15:00:31
|
Update of /cvsroot/mod-c/ehtml/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1837/src Modified Files: Profiling.cpp Log Message: Optimization: saveProfile() is now a little gentler. >From now on, saveProfile() generates a single file per process, not a file for each request. This makes profiling data merges quite faster, provided that saveProfile() is called once per process (preferably with atexti(saveProfile);). Index: Profiling.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/Profiling.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Profiling.cpp 12 Mar 2007 19:18:46 -0000 1.8 --- Profiling.cpp 2 Aug 2007 15:00:25 -0000 1.9 *************** *** 108,120 **** } void saveProfile() { void* cb = NULL; struct runspec spec; - char file[48]; - struct timeval now; - gettimeofday(&now, NULL); - snprintf(file, sizeof(file), "/tmp/ehtml_profile.%d.%lu.%lu", - getpid(), now.tv_sec, now.tv_usec); - FILE* f = fopen(file, "at"); while (profile_tick(&cb, &spec), cb != NULL) fprintf(f, "%s@%s:%d\ta%llu\ts%llu\tn%llu\n", --- 108,135 ---- } + #define EHTML_PROFILE "ehtml_profile" + void saveProfile() { + char* file = NULL; + if (file == NULL) { + char* tmpdir = getenv("TMPDIR"); + if (tmpdir == NULL) + tmpdir = "/tmp"; + size_t len = strlen(tmpdir)+1+strlen(EHTML_PROFILE)+1+10; + file = (char*)malloc(len+1); + if (file == NULL) + return; + snprintf(file, len, "%s/%s.%d", + tmpdir, EHTML_PROFILE, getpid()); + } + + FILE* f = fopen(file, "at"); + free(file); + + if (f == NULL) + return; + void* cb = NULL; struct runspec spec; while (profile_tick(&cb, &spec), cb != NULL) fprintf(f, "%s@%s:%d\ta%llu\ts%llu\tn%llu\n", *************** *** 122,129 **** spec.accum, spec.self, spec.ncalls); fclose(f); - char file1[53]; - snprintf(file1, sizeof(file1), "%s.done", file); - rename(file, file1); - unlink(file); } --- 137,140 ---- |
From: Gonzalo A. <ga...@us...> - 2007-04-01 13:25:58
|
Update of /cvsroot/mod-c/mod_c/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv844/src Modified Files: lib_cache.cpp mod_c.c Log Message: Fixed FreeBSD portability issues. * Added missing headers. Index: lib_cache.cpp =================================================================== RCS file: /cvsroot/mod-c/mod_c/src/lib_cache.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lib_cache.cpp 12 Oct 2006 21:12:07 -0000 1.5 --- lib_cache.cpp 1 Apr 2007 13:25:55 -0000 1.6 *************** *** 37,40 **** --- 37,43 ---- #include <ehtml.h> + #include <sys/types.h> + #include <sys/stat.h> + using namespace std; Index: mod_c.c =================================================================== RCS file: /cvsroot/mod-c/mod_c/src/mod_c.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** mod_c.c 6 Nov 2006 19:48:20 -0000 1.33 --- mod_c.c 1 Apr 2007 13:25:55 -0000 1.34 *************** *** 42,45 **** --- 42,48 ---- #include <assert.h> + #include <sys/types.h> + #include <sys/stat.h> + /** |
From: Gonzalo A. <ga...@us...> - 2007-04-01 13:25:12
|
Update of /cvsroot/mod-c/mod_c/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv32383/src Modified Files: Makefile.am Log Message: Fixed FreeBSD portability issues: * Added a check for '-ldl'. * Added missing -l$(EHTML_LIB_DIR) (linking fails under FreeBSD). Index: Makefile.am =================================================================== RCS file: /cvsroot/mod-c/mod_c/src/Makefile.am,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Makefile.am 12 Sep 2006 22:42:07 -0000 1.16 --- Makefile.am 1 Apr 2007 13:25:08 -0000 1.17 *************** *** 2,5 **** --- 2,6 ---- HTTPD_INCLUDE_DIR = @APACHE_LOCATION@ EHTML_INCLUDE_DIR = @EHTML_LOCATION@ + EHTML_LIB_DIR = @EHTML_LOCATION@/../../lib INCLUDE_DIRS = -I$(APR_0_INCLUDE) -I$(HTTPD_INCLUDE_DIR) -I$(EHTML_INCLUDE_DIR) -I$(srcdir)/../include AM_CXXFLAGS = $(INCLUDE_DIRS) *************** *** 7,10 **** --- 8,12 ---- APXS = @APXS@ TEMP_LIBPATH = @abs_srcdir@ + DL = @DL@ noinst_LIBRARIES = libmod_c.a *************** *** 16,20 **** mod_c$(EXEEXT): mod_c.c libmod_c.a ! $(APXS) $(INCLUDE_DIRS) -Wc,"$(CFLAGS)" -L$(srcdir) -c mod_c.c -lmod_c -ldl -lstdc++ -lehtml rm -f mod_c.so ln -s .libs/mod_c.so mod_c.so --- 18,22 ---- mod_c$(EXEEXT): mod_c.c libmod_c.a ! $(APXS) $(INCLUDE_DIRS) -Wc,"$(CFLAGS)" -L$(srcdir) -c mod_c.c -lmod_c $(DL) -lstdc++ -L$(EHTML_LIB_DIR) -lehtml rm -f mod_c.so ln -s .libs/mod_c.so mod_c.so |
From: Gonzalo A. <ga...@us...> - 2007-04-01 13:25:12
|
Update of /cvsroot/mod-c/mod_c In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv32383 Modified Files: configure.ac Log Message: Fixed FreeBSD portability issues: * Added a check for '-ldl'. * Added missing -l$(EHTML_LIB_DIR) (linking fails under FreeBSD). Index: configure.ac =================================================================== RCS file: /cvsroot/mod-c/mod_c/configure.ac,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** configure.ac 12 Sep 2006 23:46:51 -0000 1.10 --- configure.ac 1 Apr 2007 13:25:06 -0000 1.11 *************** *** 136,139 **** --- 136,148 ---- ############################################################################## + dnl Check if -ldl is needed for dlopen + AC_CHECK_LIB([dl],[dlopen],[ + DL=-ldl + ],[ + DL= + ]) + + ############################################################################## + # All the variables we need... AC_SUBST(APACHE_FOUND) *************** *** 144,147 **** --- 153,157 ---- AC_SUBST(EHTML_LOCATION) AC_SUBST(APXS) + AC_SUBST(DL) AC_CONFIG_FILES([Makefile |
From: Gonzalo A. <ga...@us...> - 2007-03-13 12:59:19
|
Update of /cvsroot/mod-c/ehtml/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23027/src Modified Files: DiskSessionDriver.cpp Session.cpp Log Message: Second attempt to fix time_t printf tag. Under FreeBSD is defined as a long int, and under Linux is defined as a int32_t. Index: Session.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/Session.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Session.cpp 12 Mar 2007 23:05:57 -0000 1.21 --- Session.cpp 13 Mar 2007 12:59:13 -0000 1.22 *************** *** 319,323 **** ProfileMe(); char _e[11]; ! snprintf(_e, 11, "%u", _expires); operator[]("$$__EXPIRES$$") = _e; string s(Dictionary::Serialize()); --- 319,323 ---- ProfileMe(); char _e[11]; ! snprintf(_e, 11, "%ld", static_cast<long int>(_expires)); operator[]("$$__EXPIRES$$") = _e; string s(Dictionary::Serialize()); *************** *** 329,333 **** ProfileMe(); char _e[11]; ! snprintf(_e, 11, "%u", s.Expires()); s["$$__EXPIRES$$"] = _e; o << *static_cast<Dictionary*>(&s); --- 329,333 ---- ProfileMe(); char _e[11]; ! snprintf(_e, 11, "%ld", static_cast<long int>(s.Expires())); s["$$__EXPIRES$$"] = _e; o << *static_cast<Dictionary*>(&s); Index: DiskSessionDriver.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/DiskSessionDriver.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DiskSessionDriver.cpp 12 Mar 2007 23:06:43 -0000 1.11 --- DiskSessionDriver.cpp 13 Mar 2007 12:59:13 -0000 1.12 *************** *** 196,202 **** } if (dev->Expired()) { ! Application()->Error("expired session (id=%s, expires=%u, " ! "now=%u)\n", id.hex().c_str(), dev->Expires(), ! time(NULL)); delete dev; dev = NULL; --- 196,203 ---- } if (dev->Expired()) { ! Application()->Error("expired session (id=%s, expires=%ld, " ! "now=%ld)\n", id.hex().c_str(), ! static_cast<long int>(dev->Expires()), ! static_cast<long int>(time(NULL))); delete dev; dev = NULL; |
From: Gonzalo A. <ga...@us...> - 2007-03-12 23:14:47
|
Update of /cvsroot/mod-c/ehtml/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15044/src Modified Files: Request.cpp Log Message: Fixed printf-format spec ('size_t' is not %lu, but %u). Index: Request.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/Request.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Request.cpp 9 Mar 2007 19:55:06 -0000 1.28 --- Request.cpp 12 Mar 2007 23:14:43 -0000 1.29 *************** *** 107,111 **** used += nbytes; content[used] = '\0'; ! Debug("got %ld bytes (%lu total): %s", nbytes, used, content); if (ContentType == CT_MULTIPART_FORM_DATA) { ReadSoFar += nbytes; --- 107,111 ---- used += nbytes; content[used] = '\0'; ! Debug("got %ld bytes (%u total): %s", nbytes, used, content); if (ContentType == CT_MULTIPART_FORM_DATA) { ReadSoFar += nbytes; |
From: Gonzalo A. <ga...@us...> - 2007-03-12 23:06:46
|
Update of /cvsroot/mod-c/ehtml/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv11736/src Modified Files: DiskSessionDriver.cpp Log Message: * Added missing headers (sys/types.h & sys/stat.h). * Fixed printf-format spec for time_t vars. Index: DiskSessionDriver.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/DiskSessionDriver.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DiskSessionDriver.cpp 6 Nov 2006 19:49:43 -0000 1.10 --- DiskSessionDriver.cpp 12 Mar 2007 23:06:43 -0000 1.11 *************** *** 33,36 **** --- 33,39 ---- #include "Profiling.h" + #include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> #include <iostream> *************** *** 193,198 **** } if (dev->Expired()) { ! Application()->Error("expired session (id=%s, expires=%lu, " ! "now=%lu)\n", id.hex().c_str(), dev->Expires(), time(NULL)); delete dev; dev = NULL; --- 196,202 ---- } if (dev->Expired()) { ! Application()->Error("expired session (id=%s, expires=%u, " ! "now=%u)\n", id.hex().c_str(), dev->Expires(), ! time(NULL)); delete dev; dev = NULL; |
From: Gonzalo A. <ga...@us...> - 2007-03-12 23:06:01
|
Update of /cvsroot/mod-c/ehtml/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv11369/src Modified Files: Session.cpp Log Message: Fixed format (remove a compilation wraning under FreeBSD). Index: Session.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/Session.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Session.cpp 6 Nov 2006 19:49:43 -0000 1.20 --- Session.cpp 12 Mar 2007 23:05:57 -0000 1.21 *************** *** 319,323 **** ProfileMe(); char _e[11]; ! snprintf(_e, 11, "%lu", _expires); operator[]("$$__EXPIRES$$") = _e; string s(Dictionary::Serialize()); --- 319,323 ---- ProfileMe(); char _e[11]; ! snprintf(_e, 11, "%u", _expires); operator[]("$$__EXPIRES$$") = _e; string s(Dictionary::Serialize()); *************** *** 329,333 **** ProfileMe(); char _e[11]; ! snprintf(_e, 11, "%lu", s.Expires()); s["$$__EXPIRES$$"] = _e; o << *static_cast<Dictionary*>(&s); --- 329,333 ---- ProfileMe(); char _e[11]; ! snprintf(_e, 11, "%u", s.Expires()); s["$$__EXPIRES$$"] = _e; o << *static_cast<Dictionary*>(&s); |
From: Gonzalo A. <ga...@us...> - 2007-03-12 23:05:34
|
Update of /cvsroot/mod-c/ehtml/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10933/src Modified Files: DefaultSessionAddress.h Log Message: Added required include (by FreeBSD) <sys/types.h>, and removed unneded <netinet/in.h> (in FreeBSD this actualy caused a problem). Index: DefaultSessionAddress.h =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/DefaultSessionAddress.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DefaultSessionAddress.h 12 Oct 2006 21:10:36 -0000 1.2 --- DefaultSessionAddress.h 12 Mar 2007 23:05:31 -0000 1.3 *************** *** 34,42 **** extern "C" { #include <sys/socket.h> // ipv4 sockets #include <netinet/in.h> - #include <netinet/ip.h> /* superset of previous */ #include <arpa/inet.h> --- 34,42 ---- extern "C" { + #include <sys/types.h> #include <sys/socket.h> // ipv4 sockets #include <netinet/in.h> #include <arpa/inet.h> |
From: Gonzalo A. <ga...@us...> - 2007-03-12 23:04:39
|
Update of /cvsroot/mod-c/ehtml/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10828/src Modified Files: Common.cpp DefaultSessionServer.cpp ehtml_prof_util.cpp Log Message: Added missing includes (required by FreeBSD, but not by Linux). Index: Common.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/Common.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Common.cpp 9 Nov 2006 15:57:25 -0000 1.17 --- Common.cpp 12 Mar 2007 23:04:35 -0000 1.18 *************** *** 31,34 **** --- 31,39 ---- #include "Common.h" #include "Profiling.h" + + #include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> + #include <stdlib.h> #include <sstream> Index: ehtml_prof_util.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/ehtml_prof_util.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ehtml_prof_util.cpp 12 Mar 2007 19:18:46 -0000 1.1 --- ehtml_prof_util.cpp 12 Mar 2007 23:04:35 -0000 1.2 *************** *** 35,38 **** --- 35,39 ---- #include <assert.h> + #include <errno.h> #include <map> Index: DefaultSessionServer.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/DefaultSessionServer.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DefaultSessionServer.cpp 12 Oct 2006 21:10:36 -0000 1.2 --- DefaultSessionServer.cpp 12 Mar 2007 23:04:35 -0000 1.3 *************** *** 38,41 **** --- 38,42 ---- #include <string.h> #include <sys/socket.h> + #include <sys/stat.h> #include <sys/un.h> #include <unistd.h> |
From: Gonzalo A. <ga...@us...> - 2007-03-12 22:45:43
|
Update of /cvsroot/mod-c/ehtml In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv31032 Modified Files: bootstrap.sh Log Message: Made it more FreeBSD friendly. Index: bootstrap.sh =================================================================== RCS file: /cvsroot/mod-c/ehtml/bootstrap.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bootstrap.sh 23 Aug 2006 14:17:13 -0000 1.2 --- bootstrap.sh 12 Mar 2007 22:37:09 -0000 1.3 *************** *** 12,20 **** # Generate AM macros for autoconf ! aclocal # configure.in => configure echo autoconf ! autoconf --force # ads ltmain.sh --- 12,20 ---- # Generate AM macros for autoconf ! aclocal || aclocal19 # configure.in => configure echo autoconf ! autoconf --force || autoconf259 --force # ads ltmain.sh *************** *** 23,29 **** # Makefile.am => Makefile.in ! autoheader echo automake --add-missing --copy ! automake --add-missing --copy exit 0 --- 23,29 ---- # Makefile.am => Makefile.in ! autoheader || autoheader259 echo automake --add-missing --copy ! automake --add-missing --copy || automake19 --add-missing --copy exit 0 |
From: Gonzalo A. <ga...@us...> - 2007-03-12 22:45:43
|
Update of /cvsroot/mod-c/mod_c In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv2641 Modified Files: bootstrap.sh Log Message: More FreeBSD friendly. Index: bootstrap.sh =================================================================== RCS file: /cvsroot/mod-c/mod_c/bootstrap.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bootstrap.sh 25 Aug 2006 13:28:20 -0000 1.2 --- bootstrap.sh 12 Mar 2007 22:45:40 -0000 1.3 *************** *** 7,21 **** rm -rvf configure config.log config.h autom4te.cache aclocal.m4 rm -rvf Makefile.in stamp-h.in src/Makefile.in ! rm -rvf cfgaux/[a-z]* src/cfgaux/[a-z]* ! rm -rvf config.status config.guess mkdir cfgaux || true # Generate AM macros for autoconf ! aclocal # configure.in => configure echo autoconf ! autoconf --force # ads ltmain.sh --- 7,20 ---- rm -rvf configure config.log config.h autom4te.cache aclocal.m4 rm -rvf Makefile.in stamp-h.in src/Makefile.in ! rm -rvf cfgaux/[a-z]* src/cfgaux/[a-z]* config.status config.guess mkdir cfgaux || true # Generate AM macros for autoconf ! aclocal || aclocal19 # configure.in => configure echo autoconf ! autoconf --force || autoconf259 --force # ads ltmain.sh *************** *** 24,30 **** # Makefile.am => Makefile.in ! autoheader echo automake --add-missing --copy ! automake --add-missing --copy exit 0 --- 23,29 ---- # Makefile.am => Makefile.in ! autoheader || autoheader259 echo automake --add-missing --copy ! automake --add-missing --copy || automake19 --add-missing --copy exit 0 |
From: Gonzalo A. <ga...@us...> - 2007-03-12 19:18:51
|
Update of /cvsroot/mod-c/ehtml/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10474/src Modified Files: Makefile.am Profiling.cpp Added Files: ehtml_prof_util.cpp Log Message: Implemented a profiling information persistent storage. ehmlt_prof_util merges profiling information and generates profiling reports (plain old text so far). Index: Makefile.am =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile.am 12 Oct 2006 18:30:33 -0000 1.13 --- Makefile.am 12 Mar 2007 19:18:46 -0000 1.14 *************** *** 13,17 **** lib_LTLIBRARIES = libehtml.la libsession.la libdisksession.la libsessionid.la ! bin_PROGRAMS = mod_c_dss noinst_PROGRAMS = testCommon --- 13,17 ---- lib_LTLIBRARIES = libehtml.la libsession.la libdisksession.la libsessionid.la ! bin_PROGRAMS = mod_c_dss ehtml_prof_util noinst_PROGRAMS = testCommon *************** *** 43,46 **** --- 43,48 ---- mod_c_dss_CXXFLAGS = $(INCLUDE_DIRS) + ehtml_prof_util_SOURCES = ehtml_prof_util.cpp + LIBSESS_SOURCES = DefaultSessionAddress.cpp LIBSESS_SOURCES += DefaultSessionDriver.cpp --- NEW FILE: ehtml_prof_util.cpp --- // // Authors: // Gonzalo Arana (gon...@gm...) // // (C) 2006 Gonzalo Arana // // // This source code is licenced under The MIT License: // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // #include "Profiling.h" #include <fstream> #include <iostream> #include <iomanip> #include <assert.h> #include <map> #include <set> using namespace std; struct prof { prof(): accum(0), self(0), ncalls(0) { ; } prof& operator += (const prof& p); ~prof() { ; } hrtime_t accum; hrtime_t self; int64_t ncalls; }; prof& prof::operator += (const prof& p) { accum += p.accum; self += p.self; ncalls += p.ncalls; return *this; } map<string,prof> stats; const char* USAGE = "ehtml_prof_util -m result_file file [file [file ...] ]\n" " Merges EHTML profiling information found in files and directories\n" " specified as arguments\n" "\n" "ehtml_prof_util -r result_file [sort_column]" " Generates a report to stdout sorted by sort_column.\n" " sort_column must be 4 chars, and it must be a combination of these:\n" " 'a': accumulated time.\n" " 'n': number of calls.\n" " 's': self accumulated time.\n" " 'l': location (dictionary sorted).\n" "\n" ; size_t max_loc_len = 0; static void read_profiles(const char* files[]) { static char line[8192]; for (int i = 0; files[i]; ++i) { ifstream in(files[i]); if (!in.good()) { cerr << "Error: could not open file \"" << files[i] << "\": " << strerror(errno) << "\n"; continue; } hrtime_t values[3]; char types[3]; static char location[512]; prof p; while (in.getline(line, sizeof(line)-1).good()) { line[sizeof(line)-1] = '\0'; if (sscanf(line, "%s %c%llu %c%llu %c%llu", location, &types[0], &values[0], &types[1], &values[1], &types[2], &values[2]) != 7) { cerr << "Invalid line \"" << line << "\"\n"; exit(1); } for (int i = 0; i < 3; ++i) switch (types[i]) { case 'a': p.accum = values[i]; break; case 's': p.self = values[i]; break; case 'n': p.ncalls = values[i]; break; default: cerr << "Unknown field type '" << types[i] << "'\n"; break; } stats[location] += p; size_t loc_len = strlen(location); if (loc_len > max_loc_len) max_loc_len = loc_len; } } } static void save_profile(const char* out) { ofstream o(out); if (!o.good()) { cerr << "Error opening \"" << out << "\": " << strerror(errno) << "\n"; exit(2); } for (map<string,prof>::iterator i = stats.begin(); i != stats.end(); ++i) { o << i->first << "\t" << 'a' << i->second.accum << "\t" << 's' << i->second.self << "\t" << 'n' << i->second.ncalls << "\n"; } o.close(); } static void merge(const char* argv[]) { read_profiles(argv); save_profile(argv[0]); for (int i = 1; argv[i]; ++i) unlink(argv[i]); } struct profloc { profloc(const prof& _p, const string& l): p(_p), loc(l) { ; } profloc(const profloc& p): p(p.p), loc(p.loc) { ; } prof p; string loc; }; #define hrtime_cmp(x,y) ((x) < (y) ? 1 : ((x) == (y) ? 0 : -1)) struct profloc_cmp { static char cmp_order[4]; int cmp(const profloc& p1, const profloc& p2, char c) const { switch (c) { case 'a': return hrtime_cmp(p1.p.accum, p2.p.accum); case 's': return hrtime_cmp(p1.p.self, p2.p.self); case 'n': return p2.p.ncalls - p1.p.ncalls; case 'l': return strcmp(p1.loc.c_str(), p2.loc.c_str()); } assert(0); } bool operator() (const profloc& p1, const profloc& p2) const { int dev; for (int i = 0; i < 4; ++i) { dev = cmp(p1,p2,cmp_order[i]); if (dev) break; } return dev < 0; } }; char profloc_cmp::cmp_order[4] = {'s', 'a', 'n', 'l'}; static void report(const char* file, const char* sort) { const char* profiles[2]; profiles[0] = file; profiles[1] = NULL; read_profiles(profiles); if (sort == NULL) sort = "sanl"; strncpy(profloc_cmp::cmp_order, sort, 4); set<profloc, profloc_cmp> ordered; for (map<string,prof>::iterator iprof = stats.begin(); iprof != stats.end(); ++iprof) { ordered.insert(profloc(iprof->second,iprof->first)); } for (set<profloc>::iterator iprof = ordered.begin(); iprof != ordered.end(); ++iprof) { cout << setw(max_loc_len) << left << iprof->loc << setw(22) << right << iprof->p.accum << setw(22) << right << iprof->p.self << setw(12) << right << iprof->p.ncalls << endl; } } int main(int argc, const char* argv[]) { if (argc <= 2) { puts(USAGE); return 1; } if (!strcmp(argv[1], "-m")) merge(argv+2); else if (!strcmp(argv[1], "-r")) report(argv[2], argv[3]); return 0; } Index: Profiling.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/Profiling.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Profiling.cpp 8 Mar 2007 17:42:00 -0000 1.7 --- Profiling.cpp 12 Mar 2007 19:18:46 -0000 1.8 *************** *** 29,32 **** --- 29,34 ---- #include "Profiling.h" + #include <sys/time.h> + #include <time.h> #include <string.h> *************** *** 106,107 **** --- 108,129 ---- } + void saveProfile() { + void* cb = NULL; + struct runspec spec; + char file[48]; + struct timeval now; + gettimeofday(&now, NULL); + snprintf(file, sizeof(file), "/tmp/ehtml_profile.%d.%lu.%lu", + getpid(), now.tv_sec, now.tv_usec); + FILE* f = fopen(file, "at"); + while (profile_tick(&cb, &spec), cb != NULL) + fprintf(f, "%s@%s:%d\ta%llu\ts%llu\tn%llu\n", + spec.name, spec.file, spec.line, + spec.accum, spec.self, spec.ncalls); + fclose(f); + char file1[53]; + snprintf(file1, sizeof(file1), "%s.done", file); + rename(file, file1); + unlink(file); + } + |
From: Gonzalo A. <ga...@us...> - 2007-03-12 19:18:49
|
Update of /cvsroot/mod-c/ehtml/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10474/include Modified Files: Profiling.h Log Message: Implemented a profiling information persistent storage. ehmlt_prof_util merges profiling information and generates profiling reports (plain old text so far). Index: Profiling.h =================================================================== RCS file: /cvsroot/mod-c/ehtml/include/Profiling.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Profiling.h 8 Mar 2007 17:41:10 -0000 1.11 --- Profiling.h 12 Mar 2007 19:18:46 -0000 1.12 *************** *** 152,155 **** --- 152,163 ---- EXTERNC unsigned long profile_stubs(); + /** + * Save profiling information. + * + * This profile run statistics can then be merged with ehml_prof_merge + * utility. + */ + EXTERNC void saveProfile(); + #endif |
From: Gonzalo A. <ga...@us...> - 2007-03-09 19:55:13
|
Update of /cvsroot/mod-c/ehtml/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15830/src Modified Files: Request.cpp Log Message: My previous commit introduced a bug: when Content-Type is multipart/form-data (aka file upload), the content was not processed at all (due to an unitialized 'state' variable). Added a check for unknown states in Request::ParseQuery(). Index: Request.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/Request.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Request.cpp 8 Mar 2007 17:44:20 -0000 1.27 --- Request.cpp 9 Mar 2007 19:55:06 -0000 1.28 *************** *** 101,105 **** content = new char[length+1]; ! char state; char* varname; --- 101,105 ---- content = new char[length+1]; ! char state = 0; // 'h', 'v', 'F', 'p', 'd', 'f' char* varname; *************** *** 384,387 **** --- 384,389 ---- nbytes = 0; break; + default: + assert(0 && "Unknown state"); } } while (again); |
From: Gonzalo A. <ga...@us...> - 2007-03-08 17:44:24
|
Update of /cvsroot/mod-c/ehtml/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv8013/src Modified Files: Request.cpp Log Message: Fixed large POSTs processing. ap_get_client_block() must be called more than once. Index: Request.cpp =================================================================== RCS file: /cvsroot/mod-c/ehtml/src/Request.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Request.cpp 15 Dec 2006 17:44:56 -0000 1.26 --- Request.cpp 8 Mar 2007 17:44:20 -0000 1.27 *************** *** 66,69 **** --- 66,70 ---- { ProfileMe(); + int retVal = 0; request_rec * r = RequestContext->r; *************** *** 84,133 **** PARSE_HEADER; char * content = NULL; ! bool error = false; ! if (ContentType == CT_MULTIPART_FORM_DATA) { ! Debug("file upload detected"); ! int length = 4095; ! ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK); ! content = new char[length+1]; ! if (!ap_should_client_block(r)) ! break; ! long nbytes; ! size_t used = 0; ! char state = 0; // 'f': fail, 'd': done, 'p': part, 'h' header ! char* varname = NULL; ! while (0 != (nbytes = ap_get_client_block(r,content+used,length-used))) { ! content[length] = '\0'; ! used += nbytes; ! ReadSoFar += nbytes; ! Application->UploadProgressCallback(); ! ProcessUploadChunk(content, used, state, varname); ! } ! delete[] content; ! content = NULL; ! } else { ! // a simple post ! long length = ContentLength > 0 ? ContentLength : 4095; ! ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK); ! if (ap_should_client_block( r )) ! { ! // if the client is about to send content ! content = new char[length + 1]; ! error = ap_get_client_block( r, content, length) == 0; ! content[length] = '\0'; ! } ! } ! // Did an error occur? ! if ( error ) ! { ! if ( content ) ! delete[] content; ! content = NULL; ! return 1; ! } ! else if ( content ) ! // We have the query. Now parse it ! return ParseURLEncodedArgs( content, Arguments ); } break; --- 85,125 ---- PARSE_HEADER; char * content = NULL; ! long length = ContentLength > 0 ? ContentLength: 4095; ! long nbytes; ! size_t used = 0; ! if (ContentType == CT_MULTIPART_FORM_DATA) ! Debug("file upload detected"); ! if (0 != (retVal = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK))) ! return -1; ! ! if (!ap_should_client_block(r)) ! break; ! ! Debug("getting %ld bytes", length); ! ! content = new char[length+1]; ! char state; ! char* varname; ! ! while (0 != (nbytes = ap_get_client_block(r,content+used,length-used))) { ! used += nbytes; ! content[used] = '\0'; ! Debug("got %ld bytes (%lu total): %s", nbytes, used, content); ! if (ContentType == CT_MULTIPART_FORM_DATA) { ! ReadSoFar += nbytes; ! Application->UploadProgressCallback(); ! ProcessUploadChunk(content, used, state, varname); ! } ! } ! ! if (ContentType == CT_APPLICATION_URLENCODED) { ! retVal = ParseURLEncodedArgs( content, Arguments ); ! Debug("parsed (url-encoded) \"%s\": %d", content, retVal); ! } ! ! delete[] content; ! content = NULL; } break; *************** *** 137,141 **** } ! return 0; } --- 129,133 ---- } ! return retVal; } |