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:13:35 UTC

[tcl-rivet] branch 3.1 updated (533b447 -> ad9cffb)

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

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


    from 533b447  adding automatic reference to current version in configure command example
     new 6408114  cherry pick buffer size definition
     new ad9cffb  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, 19 insertions(+), 9 deletions(-)


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


[tcl-rivet] 01/02: cherry pick 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 3.1
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git

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

    cherry pick buffer size definition
---
 ChangeLog   | 8 ++++++++
 src/rivet.h | 1 +
 2 files changed, 9 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 7e769fa..7da48fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
+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-09 Massimo Manghi <mx...@apache.org>
     * .: Released as 3.1.1
 
+2018-12-24 Georgios Petasis <pe...@apache.org>
+    * README.md: Added badges also for the GitHub fork at:
+    https://github.com/petasis/tcl-rivet.
+
 2019-01-05 Massimo Manghi <mx...@apache.org>
     * doc/rivet.xml.in,doc/rivet.xml: update copyright notice, add entities
     for various Apache resources
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 3.1
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git

commit ad9cffb2bf991135de3c9410d2f087549664284d
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                           |  6 ++++--
 src/mod_rivet_ng/rivetCore.c        |  4 ++--
 src/mod_rivet_ng/rivet_worker_mpm.c | 13 ++++++-------
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7da48fe..bb9dd47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 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-09 Massimo Manghi <mx...@apache.org>
     * .: Released as 3.1.1
diff --git a/src/mod_rivet_ng/rivetCore.c b/src/mod_rivet_ng/rivetCore.c
index 66cb9d8..c499772 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