Fossil

Check-in [d6e698c265]
Login

Check-in [d6e698c265]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Corrected potential mishandling of memory ownership in the previous commit.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | mainmenu-override
Files: files | file ages | folders
SHA3-256: d6e698c2657b41a975d8e29203ba8e92b91b41d4f30926644cdac641148c75f9
User & Date: stephan 2021-02-06 04:48:42.172
Context
2021-02-06
05:12
Windows: escape --mainmenu's argument before passing it on to child ui process. ... (check-in: d059d62037 user: stephan tags: mainmenu-override)
04:48
Corrected potential mishandling of memory ownership in the previous commit. ... (check-in: d6e698c265 user: stephan tags: mainmenu-override)
04:40
Restructured how --mainmenu value is saved. Added support for it to Windows server, but that is untested. ... (check-in: 852be6d420 user: stephan tags: mainmenu-override)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
    if( blob_eq(&key, "mainmenu:") && blob_token(&line, &value) ){
      /* mainmenu: FILENAME
      **
      ** Use the contents of FILENAME as the value of the site's
      ** "mainmenu" setting, overriding the contents (for this
      ** request) of the db-side setting or the hard-coded default.
      */
      g.zMainMenuFile = blob_str(&value);
      value = empty_blob/*take over ownership*/;
      continue;
    }
    if( blob_eq(&key, "cgi-debug:") && blob_token(&line, &value) ){
      /* cgi-debug: FILENAME
      **
      ** Causes output from cgi_debug() and CGIDEBUG(()) calls to go
      ** into FILENAME.  Useful for debugging CGI configuration problems.







|
|







2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
    if( blob_eq(&key, "mainmenu:") && blob_token(&line, &value) ){
      /* mainmenu: FILENAME
      **
      ** Use the contents of FILENAME as the value of the site's
      ** "mainmenu" setting, overriding the contents (for this
      ** request) of the db-side setting or the hard-coded default.
      */
      g.zMainMenuFile = mprintf("%s", blob_str(&value));
      blob_reset(&value);
      continue;
    }
    if( blob_eq(&key, "cgi-debug:") && blob_token(&line, &value) ){
      /* cgi-debug: FILENAME
      **
      ** Causes output from cgi_debug() and CGIDEBUG(()) calls to go
      ** into FILENAME.  Useful for debugging CGI configuration problems.