Skip to content

Commit

Permalink
Fix to bug introduced by debug mode change: request_string needs to b…
Browse files Browse the repository at this point in the history
…e cleared at top of FCGI while loop.

Also added --enable-debug-mode option to configure script.
  • Loading branch information
ruven committed Sep 26, 2023
1 parent dc9dd12 commit edac6c1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
26/09/2023:
- Fix to bug introduced by debug mode change: request_string needs to be cleared at top of FCGI while loop.
- Added --enable-debug-mode option to configure script.


22/09/2023:
- Removed the max size limit from IIIF info.json sizes array. This now provides the full list of resolution sizes
with the maxWidth and maxHeight variables specifying the maximum available export size.
Expand Down
5 changes: 3 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,10 @@ additionally be set at compile time to generate additional detailed logging from

It is also possible to test iipsrv without the use of FCGI or a web server. In this case, you will need to
compile iipsrv with DEBUG defined for the pre-processor. This can be done during the ./configure stage before
building using make:
building using make either manually by setting adding -DDEBUG to CXXFLAGS or automatically through the
--enable-debug-mode option:

CXXFLAGS="-DDEBUG" ./configure
./configure --enable-debug-mode
make

The resulting binary can be started on the command line and will accept any supported imaging protocol requests
Expand Down
25 changes: 14 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ AC_LANG_POP([C++])
#************************************************************
# Enable debugging

AC_ARG_ENABLE([debug],
[ --enable-debug turn on debugging],
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],[debug=false])
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
AC_ARG_ENABLE([debug-mode],
[ --enable-debug-mode enable debugging mode (no FCGI)],
[AC_DEFINE(DEBUG)
AC_DEFINE(KAKADU_DEBUG)
AC_DEFINE(OPENJPEG_DEBUG)
DEBUG=true
AC_MSG_RESULT([configure: enabling debug mode])]
)



Expand Down Expand Up @@ -193,7 +193,7 @@ fi

WEBP=false
AC_ARG_ENABLE( webp,
[ --disable-webp disable WebP])
[ --disable-webp disable WebP])


if test "x$enable_webp" == "xno"; then
Expand Down Expand Up @@ -468,5 +468,8 @@ Options Enabled:
OpenMP : ${OPENMP}
Loggers : ${LOGGING}
PNG Output : ${PNG}
WebP Output : ${WEBP}
])
WebP Output : ${WEBP}])

if [test "x${DEBUG}" = xtrue]; then
AC_MSG_RESULT([ Debug mode : activated])
fi
1 change: 1 addition & 0 deletions src/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ int main( int argc, char *argv[] )
while( FCGX_Accept_r( &request ) >= 0 ){

FCGIWriter writer( request.out );
request_string.clear();

#endif

Expand Down

0 comments on commit edac6c1

Please sign in to comment.