Front page | perl.cvs.modperl.modules |
Postings from January 2005
[svn:modperl-modules] rev 90 - in Apache-Scoreboard-2.0/trunk: . apxs lib/Apache t/response/TestApache
From:
stas
Date:
January 2, 2005 14:33
Subject:
[svn:modperl-modules] rev 90 - in Apache-Scoreboard-2.0/trunk: . apxs lib/Apache t/response/TestApache
Message ID:
20050102223251.20601.qmail@x1.develooper.com
Author: stas
Date: Sun Jan 2 14:32:51 2005
New Revision: 90
Modified:
Apache-Scoreboard-2.0/trunk/Changes
Apache-Scoreboard-2.0/trunk/Scoreboard.xs
Apache-Scoreboard-2.0/trunk/apxs/send.c
Apache-Scoreboard-2.0/trunk/lib/Apache/Scoreboard.pm
Apache-Scoreboard-2.0/trunk/t/response/TestApache/scoreboard.pm
Log:
- in thaw() replace the usage of memmove with apr_pmemdup, since objects
created by the pool, can't mix memmove with apr pool allocation (found
this problem after apr was compiled with CPPFLAGS="-DAPR_BUCKET_DEBUG"
--enable-pool-debug, were getting segfaults when the pool was
destroyed)
- release 2.03
Modified: Apache-Scoreboard-2.0/trunk/Changes
==============================================================================
--- Apache-Scoreboard-2.0/trunk/Changes (original)
+++ Apache-Scoreboard-2.0/trunk/Changes Sun Jan 2 14:32:51 2005
@@ -1,4 +1,12 @@
+2.03 - Sun Jan 2 17:24:54 EST 2005
+
+in thaw() replace the usage of memmove with apr_pmemdup, since objects
+created by the pool, can't mix memmove with apr pool allocation (found
+this problem after apr was compiled with CPPFLAGS="-DAPR_BUCKET_DEBUG"
+--enable-pool-debug, were getting segfaults when the pool was
+destroyed)
+
2.02 - Tue Nov 9 18:50:29 EST 2004
- sync with mp2 API changed (s/APR::OS::Thread/U32/) and require
Modified: Apache-Scoreboard-2.0/trunk/Scoreboard.xs
==============================================================================
--- Apache-Scoreboard-2.0/trunk/Scoreboard.xs (original)
+++ Apache-Scoreboard-2.0/trunk/Scoreboard.xs Sun Jan 2 14:32:51 2005
@@ -203,23 +203,20 @@
CLASS = CLASS; /* avoid warnings */
- image = (modperl_scoreboard_t *)apr_palloc(pool, sizeof(*image));
- sb = (scoreboard *)apr_palloc(pool, sizeof(scoreboard));
- sb->parent = (process_score *)apr_palloc(pool, sizeof(process_score *));
- sb->servers = (worker_score **)apr_palloc(pool, server_limit * sizeof(worker_score));
- sb->global = (global_score *)apr_palloc(pool, sizeof(global_score *));
-
+ image = (modperl_scoreboard_t *)apr_pcalloc(pool, sizeof(*image));
+ sb = (scoreboard *)apr_pcalloc(pool, sizeof(scoreboard));
+
ptr = SvPVX(packet);
psize = unpack16(ptr);
ptr += SIZE16;
ssize = unpack16(ptr);
ptr += SIZE16;
- Move(ptr, &sb->parent[0], psize, char);
+ sb->parent = (process_score *)Copy_pool(pool, ptr, psize, char);
ptr += psize;
- Move(ptr, &sb->servers[0], ssize, char);
+ sb->servers = (worker_score **)Copy_pool(pool, ptr, ssize, char);
ptr += ssize;
- Move(ptr, &sb->global, sizeof(global_score), char);
+ sb->global = (global_score *) Copy_pool(pool, ptr, sizeof(global_score), char);
image->pool = pool;
image->sb = sb;
Modified: Apache-Scoreboard-2.0/trunk/apxs/send.c
==============================================================================
--- Apache-Scoreboard-2.0/trunk/apxs/send.c (original)
+++ Apache-Scoreboard-2.0/trunk/apxs/send.c Sun Jan 2 14:32:51 2005
@@ -7,6 +7,10 @@
#define Copy(s,d,n,t) (void)memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
#endif
+/* use this macro when using with objects created by the pool, can't
+ * mix memmove with pool allocation */
+#define Copy_pool(p, s, n, t) apr_pmemdup(p, s, (n) * sizeof(t))
+
#define SIZE16 2
static void pack16(unsigned char *s, int p)
@@ -22,7 +26,6 @@
return ntohs(ashort);
}
-
#define WRITE_BUFF(buf, size, r) \
if (ap_rwrite(buf, size, r) < 0) { return APR_EGENERAL; }
Modified: Apache-Scoreboard-2.0/trunk/lib/Apache/Scoreboard.pm
==============================================================================
--- Apache-Scoreboard-2.0/trunk/lib/Apache/Scoreboard.pm (original)
+++ Apache-Scoreboard-2.0/trunk/lib/Apache/Scoreboard.pm Sun Jan 2 14:32:51 2005
@@ -1,6 +1,6 @@
package Apache::Scoreboard;
-$Apache::Scoreboard::VERSION = '2.02';
+$Apache::Scoreboard::VERSION = '2.03';
use strict;
use warnings FATAL => 'all';
Modified: Apache-Scoreboard-2.0/trunk/t/response/TestApache/scoreboard.pm
==============================================================================
--- Apache-Scoreboard-2.0/trunk/t/response/TestApache/scoreboard.pm (original)
+++ Apache-Scoreboard-2.0/trunk/t/response/TestApache/scoreboard.pm Sun Jan 2 14:32:51 2005
@@ -5,6 +5,7 @@
use Apache::Test;
use Apache::TestUtil;
+use Apache::TestTrace;
use Apache::Response ();
use Apache::RequestRec;
@@ -42,7 +43,7 @@
### constants ###
- warn "PID: ", $$, "ppid:", getppid(), "\n";
+ debug "PID: ", $$, " ppid:", getppid(), "\n";
t_debug("constants");
ok Apache::Const::SERVER_LIMIT;
@@ -105,7 +106,6 @@
) {
$next_ok = 0 unless worker_score_is_ok($worker_score);
}
-warn "ok end\n";
# iterating over only live workers for the given parent
for (my $worker_score = $parent_score->worker_score;
-
[svn:modperl-modules] rev 90 - in Apache-Scoreboard-2.0/trunk: . apxs lib/Apache t/response/TestApache
by stas