Fossil SCM

Make the '--th-trace' option work properly on Windows.

mistachkin 2016-08-18 02:45 trunk
Commit 11d3d721252fbcd98117b5bec864aa954b1aaa1b
2 files changed +3 +4 -1
+3
--- src/main.c
+++ src/main.c
@@ -2363,10 +2363,11 @@
23632363
** --nossl signal that no SSL connections are available
23642364
** --notfound URL use URL as "HTTP 404, object not found" page.
23652365
** --repolist If REPOSITORY is directory, URL "/" lists all repos
23662366
** --scgi Interpret input as SCGI rather than HTTP
23672367
** --skin LABEL Use override skin LABEL
2368
+** --th-trace trace TH1 execution (for debugging purposes)
23682369
**
23692370
** See also: cgi, server, winsrv
23702371
*/
23712372
void cmd_http(void){
23722373
const char *zIpAddr = 0;
@@ -2375,10 +2376,12 @@
23752376
const char *zAltBase;
23762377
const char *zFileGlob;
23772378
int useSCGI;
23782379
int noJail;
23792380
int allowRepoList;
2381
+
2382
+ Th_InitTraceLog();
23802383
23812384
/* The winhttp module passes the --files option as --files-urlenc with
23822385
** the argument being URL encoded, to avoid wildcard expansion in the
23832386
** shell. This option is for internal use and is undocumented.
23842387
*/
23852388
--- src/main.c
+++ src/main.c
@@ -2363,10 +2363,11 @@
2363 ** --nossl signal that no SSL connections are available
2364 ** --notfound URL use URL as "HTTP 404, object not found" page.
2365 ** --repolist If REPOSITORY is directory, URL "/" lists all repos
2366 ** --scgi Interpret input as SCGI rather than HTTP
2367 ** --skin LABEL Use override skin LABEL
 
2368 **
2369 ** See also: cgi, server, winsrv
2370 */
2371 void cmd_http(void){
2372 const char *zIpAddr = 0;
@@ -2375,10 +2376,12 @@
2375 const char *zAltBase;
2376 const char *zFileGlob;
2377 int useSCGI;
2378 int noJail;
2379 int allowRepoList;
 
 
2380
2381 /* The winhttp module passes the --files option as --files-urlenc with
2382 ** the argument being URL encoded, to avoid wildcard expansion in the
2383 ** shell. This option is for internal use and is undocumented.
2384 */
2385
--- src/main.c
+++ src/main.c
@@ -2363,10 +2363,11 @@
2363 ** --nossl signal that no SSL connections are available
2364 ** --notfound URL use URL as "HTTP 404, object not found" page.
2365 ** --repolist If REPOSITORY is directory, URL "/" lists all repos
2366 ** --scgi Interpret input as SCGI rather than HTTP
2367 ** --skin LABEL Use override skin LABEL
2368 ** --th-trace trace TH1 execution (for debugging purposes)
2369 **
2370 ** See also: cgi, server, winsrv
2371 */
2372 void cmd_http(void){
2373 const char *zIpAddr = 0;
@@ -2375,10 +2376,12 @@
2376 const char *zAltBase;
2377 const char *zFileGlob;
2378 int useSCGI;
2379 int noJail;
2380 int allowRepoList;
2381
2382 Th_InitTraceLog();
2383
2384 /* The winhttp module passes the --files option as --files-urlenc with
2385 ** the argument being URL encoded, to avoid wildcard expansion in the
2386 ** shell. This option is for internal use and is undocumented.
2387 */
2388
+4 -1
--- src/winhttp.c
+++ src/winhttp.c
@@ -34,11 +34,11 @@
3434
struct HttpRequest {
3535
int id; /* ID counter */
3636
SOCKET s; /* Socket on which to receive data */
3737
SOCKADDR_IN addr; /* Address from which data is coming */
3838
int flags; /* Flags passed to win32_http_server() */
39
- const char *zOptions; /* --baseurl, --notfound and/or --localauth options */
39
+ const char *zOptions; /* --baseurl, --notfound, --localauth, --th-trace */
4040
};
4141
4242
/*
4343
** Prefix for a temporary file.
4444
*/
@@ -265,10 +265,13 @@
265265
blob_appendf(&options, " --files-urlenc %T", zFileGlob);
266266
}
267267
if( g.useLocalauth ){
268268
blob_appendf(&options, " --localauth");
269269
}
270
+ if( g.thTrace ){
271
+ blob_appendf(&options, " --th-trace");
272
+ }
270273
if( flags & HTTP_SERVER_REPOLIST ){
271274
blob_appendf(&options, " --repolist");
272275
}
273276
if( WSAStartup(MAKEWORD(1,1), &wd) ){
274277
fossil_fatal("unable to initialize winsock");
275278
--- src/winhttp.c
+++ src/winhttp.c
@@ -34,11 +34,11 @@
34 struct HttpRequest {
35 int id; /* ID counter */
36 SOCKET s; /* Socket on which to receive data */
37 SOCKADDR_IN addr; /* Address from which data is coming */
38 int flags; /* Flags passed to win32_http_server() */
39 const char *zOptions; /* --baseurl, --notfound and/or --localauth options */
40 };
41
42 /*
43 ** Prefix for a temporary file.
44 */
@@ -265,10 +265,13 @@
265 blob_appendf(&options, " --files-urlenc %T", zFileGlob);
266 }
267 if( g.useLocalauth ){
268 blob_appendf(&options, " --localauth");
269 }
 
 
 
270 if( flags & HTTP_SERVER_REPOLIST ){
271 blob_appendf(&options, " --repolist");
272 }
273 if( WSAStartup(MAKEWORD(1,1), &wd) ){
274 fossil_fatal("unable to initialize winsock");
275
--- src/winhttp.c
+++ src/winhttp.c
@@ -34,11 +34,11 @@
34 struct HttpRequest {
35 int id; /* ID counter */
36 SOCKET s; /* Socket on which to receive data */
37 SOCKADDR_IN addr; /* Address from which data is coming */
38 int flags; /* Flags passed to win32_http_server() */
39 const char *zOptions; /* --baseurl, --notfound, --localauth, --th-trace */
40 };
41
42 /*
43 ** Prefix for a temporary file.
44 */
@@ -265,10 +265,13 @@
265 blob_appendf(&options, " --files-urlenc %T", zFileGlob);
266 }
267 if( g.useLocalauth ){
268 blob_appendf(&options, " --localauth");
269 }
270 if( g.thTrace ){
271 blob_appendf(&options, " --th-trace");
272 }
273 if( flags & HTTP_SERVER_REPOLIST ){
274 blob_appendf(&options, " --repolist");
275 }
276 if( WSAStartup(MAKEWORD(1,1), &wd) ){
277 fossil_fatal("unable to initialize winsock");
278

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button