You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tcl.apache.org by mx...@apache.org on 2019/01/21 10:14:00 UTC

[tcl-rivet] branch master updated (a280718 -> 3ee8278)

This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git.


    from a280718  manual pages corrections and improvements
     new 5034d60  Add error message buffer size definition
     new 3ee8278  error message buffer size definitions now using RIVET_MSG_BUFFER_SIZE

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ChangeLog                           | 10 ++++++++--
 src/mod_rivet_ng/rivetCore.c        |  4 ++--
 src/mod_rivet_ng/rivet_worker_mpm.c | 13 ++++++-------
 src/rivet.h                         |  1 +
 4 files changed, 17 insertions(+), 11 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org


[tcl-rivet] 01/02: Add error message buffer size definition

Posted by mx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git

commit 5034d60a72bedf0d391275d6bb466b6148142c9b
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Mon Jan 21 11:04:36 2019 +0100

    Add error message buffer size definition
---
 ChangeLog   | 4 ++++
 src/rivet.h | 1 +
 2 files changed, 5 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 9e19fe4..1703254 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-01-21 Massimo Manghi <mx...@apache.org>
+    * src/rivet.h: Add error message buffer size definition (was still hardcoded
+    here and there)
+
 2019-01-05 Massimo Manghi <mx...@apache.org>
     * doc/: merging from 3.1 fixes to various broken docbook elements
     and new entities to external resources' URLs
diff --git a/src/rivet.h b/src/rivet.h
index aec2faa..6572647 100644
--- a/src/rivet.h
+++ b/src/rivet.h
@@ -40,6 +40,7 @@ typedef int rivet_req_ctype;
 #define RIVET_NS                "::rivet"
 #define RIVET_TCL_PACKAGE       "rivet"
 #define RIVETLIB_TCL_PACKAGE    "rivetlib"
+#define RIVET_MSG_BUFFER_SIZE   512
 
 /* Macros to access and check thread private data */
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org


[tcl-rivet] 02/02: error message buffer size definitions now using RIVET_MSG_BUFFER_SIZE

Posted by mx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git

commit 3ee8278d3e598a63145f9e79e5a43a46307ca76f
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Mon Jan 21 11:09:09 2019 +0100

    error message buffer size definitions now using RIVET_MSG_BUFFER_SIZE
---
 ChangeLog                           | 10 ++++++----
 src/mod_rivet_ng/rivetCore.c        |  4 ++--
 src/mod_rivet_ng/rivet_worker_mpm.c | 13 ++++++-------
 3 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1703254..b28947e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,12 @@
 2019-01-21 Massimo Manghi <mx...@apache.org>
-    * src/rivet.h: Add error message buffer size definition (was still hardcoded
-    here and there)
+	* src/rivet.h: Add error message buffer size definition (was still hardcoded
+	here and there)
+	* src/mod_rivet_ng/rivetCore.c,rivet_worker_mpm.c: hardcoded buffer size into
+	their correct macro definitions
 
 2019-01-05 Massimo Manghi <mx...@apache.org>
-    * doc/: merging from 3.1 fixes to various broken docbook elements
-    and new entities to external resources' URLs
+	* doc/: merging from 3.1 fixes to various broken docbook elements
+	and new entities to external resources' URLs
 
 2018-12-24 Georgios Petasis <pe...@apache.org>
     * README.md: Added badges also for the GitHub fork at:
diff --git a/src/mod_rivet_ng/rivetCore.c b/src/mod_rivet_ng/rivetCore.c
index 2c871e9..134dcf5 100644
--- a/src/mod_rivet_ng/rivetCore.c
+++ b/src/mod_rivet_ng/rivetCore.c
@@ -278,9 +278,9 @@ TCL_CMD_HEADER( Rivet_Parse )
     stat_s = apr_stat(&finfo_b,filename,APR_FINFO_NORM,private->r->pool);
     if (stat_s != APR_SUCCESS)
     {
-        char apr_error_message[256];
+        char apr_error_message[RIVET_MSG_BUFFER_SIZE];
 
-        Tcl_AddErrorInfo(interp,apr_strerror(stat_s,apr_error_message,256));
+        Tcl_AddErrorInfo(interp,apr_strerror(stat_s,apr_error_message,RIVET_MSG_BUFFER_SIZE));
         return TCL_ERROR;
     }
 
diff --git a/src/mod_rivet_ng/rivet_worker_mpm.c b/src/mod_rivet_ng/rivet_worker_mpm.c
index 7c36afe..0f94202 100644
--- a/src/mod_rivet_ng/rivet_worker_mpm.c
+++ b/src/mod_rivet_ng/rivet_worker_mpm.c
@@ -313,9 +313,9 @@ static void start_thread_pool (int nthreads)
 
         if (rv != APR_SUCCESS) 
         {
-            char    errorbuf[512];
+            char    errorbuf[RIVET_MSG_BUFFER_SIZE];
 
-            apr_strerror(rv, errorbuf,200);
+            apr_strerror(rv, errorbuf,RIVET_MSG_BUFFER_SIZE);
             ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, module_globals->server, 
                 "Error starting request_processor thread (%d) rv=%d:%s\n",i,rv,errorbuf);
             exit(1);
@@ -409,18 +409,17 @@ static void* APR_THREAD_FUNC threaded_bridge_supervisor (apr_thread_t *thd, void
 
                     rv = create_worker_thread (&((apr_thread_t **)mpm->workers)[i]);
                     if (rv != APR_SUCCESS) {
-                        char errorbuf[512];
+                        char errorbuf[RIVET_MSG_BUFFER_SIZE];
 
                         /* we shouldn't ever be in the condition of not being able to start a new thread
                          * Whatever is the reason we log a message and terminate the whole process
                          */
 
-                        apr_strerror(rv,errorbuf,200);
+                        apr_strerror(rv,errorbuf,RIVET_MSG_BUFFER_SIZE);
                         ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, 
                             "Error starting request_processor thread (%d) rv=%d:%s",i,rv,errorbuf);
 
                         exit(1);
-
                     }
                     
                     break;
@@ -539,9 +538,9 @@ void Worker_MPM_ChildInit (apr_pool_t* pool, server_rec* server)
                             threaded_bridge_supervisor, server, module_globals->pool);
 
     if (rv != APR_SUCCESS) {
-        char    errorbuf[512];
+        char errorbuf[RIVET_MSG_BUFFER_SIZE];
 
-        apr_strerror(rv, errorbuf,200);
+        apr_strerror(rv, errorbuf,RIVET_MSG_BUFFER_SIZE);
         ap_log_error(APLOG_MARK, APLOG_ERR, rv, server, 
                      MODNAME "Error starting supervisor thread rv=%d:%s\n",rv,errorbuf);
         exit(1);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org