Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Make "fossil version -v" report the right openssl version, even when it was linked dynamically with openssl and the openssl version was later upgraded. Remove some dead code and comments which are not true any more. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
48f1239eb2e9098b5c2f3b7d118683e4 |
| User & Date: | jan.nijtmans 2014-06-06 07:10:37.424 |
Context
|
2014-06-06
| ||
| 07:19 | A few additions of "const" keyword, reducing the number of compiler warnings when compiling with -Wwrite-strings check-in: 0a754750ef user: jan.nijtmans tags: trunk | |
| 07:10 | Make "fossil version -v" report the right openssl version, even when it was linked dynamically with openssl and the openssl version was later upgraded. Remove some dead code and comments which are not true any more. check-in: 48f1239eb2 user: jan.nijtmans tags: trunk | |
|
2014-06-05
| ||
| 18:39 | Update version of OpenSSL that is referred to in the makefiles. check-in: 94c0eb9724 user: mistachkin tags: trunk | |
Changes
Changes to src/main.c.
| ︙ | ︙ | |||
30 31 32 33 34 35 36 | #if defined(_WIN32) # include <windows.h> #else # include <errno.h> /* errno global */ #endif #include "zlib.h" #ifdef FOSSIL_ENABLE_SSL | | | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #if defined(_WIN32) # include <windows.h> #else # include <errno.h> /* errno global */ #endif #include "zlib.h" #ifdef FOSSIL_ENABLE_SSL # include "openssl/crypto.h" #endif #if INTERFACE #ifdef FOSSIL_ENABLE_TCL # include "tcl.h" #endif #ifdef FOSSIL_ENABLE_JSON # include "cson_amalgamation.h" /* JSON API. */ |
| ︙ | ︙ | |||
165 166 167 168 169 170 171 | int markPrivate; /* All new artifacts are private if true */ int clockSkewSeen; /* True if clocks on client and server out of sync */ int wikiFlags; /* Wiki conversion flags applied to %w and %W */ char isHTTP; /* True if server/CGI modes, else assume CLI. */ char javascriptHyperlink; /* If true, set href= using script, not HTML */ Blob httpHeader; /* Complete text of the HTTP request header */ UrlData url; /* Information about current URL */ | < < < < < < < < < < < < < < < < < < < < < < < < < | 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
int markPrivate; /* All new artifacts are private if true */
int clockSkewSeen; /* True if clocks on client and server out of sync */
int wikiFlags; /* Wiki conversion flags applied to %w and %W */
char isHTTP; /* True if server/CGI modes, else assume CLI. */
char javascriptHyperlink; /* If true, set href= using script, not HTML */
Blob httpHeader; /* Complete text of the HTTP request header */
UrlData url; /* Information about current URL */
const char *zLogin; /* Login name. NULL or "" if not logged in. */
const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
** SSL client identity */
int useLocalauth; /* No login required if from 127.0.0.1 */
int noPswd; /* Logged in without password (on 127.0.0.1) */
int userUid; /* Integer user id */
int isHuman; /* True if access by a human, not a spider or bot */
|
| ︙ | ︙ | |||
883 884 885 886 887 888 889 |
#endif
fossil_print("Compiled on %s %s using %s (%d-bit)\n",
__DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
fossil_print("SQLite %s %.30s\n", sqlite3_libversion(), sqlite3_sourceid());
fossil_print("Schema version %s\n", AUX_SCHEMA);
fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
#if defined(FOSSIL_ENABLE_SSL)
| | | 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 |
#endif
fossil_print("Compiled on %s %s using %s (%d-bit)\n",
__DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
fossil_print("SQLite %s %.30s\n", sqlite3_libversion(), sqlite3_sourceid());
fossil_print("Schema version %s\n", AUX_SCHEMA);
fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
#if defined(FOSSIL_ENABLE_SSL)
fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
#endif
#if defined(FOSSIL_ENABLE_TCL)
Th_FossilInit(TH_INIT_DEFAULT | TH_INIT_FORCE_TCL);
rc = Th_Eval(g.interp, 0, "tclInvoke info patchlevel", -1);
zRc = Th_ReturnCodeName(rc, 0);
fossil_print("TCL (Tcl %s, loaded %s: %s)\n",
TCL_PATCH_LEVEL, zRc, Th_GetResult(g.interp, 0)
|
| ︙ | ︙ |
Changes to src/url.c.
| ︙ | ︙ | |||
41 42 43 44 45 46 47 |
#define URL_REMEMBER_PW 0x008 /* Should remember pw */
#define URL_PROMPTED 0x010 /* Prompted for PW already */
/*
** The URL related data used with this subsystem.
*/
struct UrlData {
| < < < < | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
#define URL_REMEMBER_PW 0x008 /* Should remember pw */
#define URL_PROMPTED 0x010 /* Prompted for PW already */
/*
** The URL related data used with this subsystem.
*/
struct UrlData {
int isFile; /* True if a "file:" url */
int isHttps; /* True if a "https:" url */
int isSsh; /* True if an "ssh:" url */
char *name; /* Hostname for http: or filename for file: */
char *hostname; /* The HOST: parameter on http headers */
char *protocol; /* "http" or "https" */
int port; /* TCP port number for http: or https: */
|
| ︙ | ︙ | |||
211 212 213 214 215 216 217 |
cQuerySep = '&';
}
}
dehttpize(pUrlData->path);
if( pUrlData->dfltPort==pUrlData->port ){
pUrlData->canonical = mprintf(
| | | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
cQuerySep = '&';
}
}
dehttpize(pUrlData->path);
if( pUrlData->dfltPort==pUrlData->port ){
pUrlData->canonical = mprintf(
"%s://%s%T%T%s",
pUrlData->protocol, zLogin, pUrlData->name, pUrlData->path, zExe
);
}else{
pUrlData->canonical = mprintf(
"%s://%s%T:%d%T%s",
pUrlData->protocol, zLogin, pUrlData->name, pUrlData->port,
pUrlData->path, zExe
|
| ︙ | ︙ | |||
248 249 250 251 252 253 254 |
}
}else{
fossil_fatal("unknown repository: %s", zUrl);
}
if( urlFlags ) pUrlData->flags = urlFlags;
if( pUrlData->isFile ){
Blob cfile;
| | | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
}
}else{
fossil_fatal("unknown repository: %s", zUrl);
}
if( urlFlags ) pUrlData->flags = urlFlags;
if( pUrlData->isFile ){
Blob cfile;
dehttpize(zFile);
file_canonical_name(zFile, &cfile, 0);
free(zFile);
pUrlData->protocol = "file";
pUrlData->path = "";
pUrlData->name = mprintf("%b", &cfile);
pUrlData->canonical = mprintf("file://%T", pUrlData->name);
blob_reset(&cfile);
|
| ︙ | ︙ | |||
270 271 272 273 274 275 276 |
pUrlData->flags = urlFlags &= ~URL_REMEMBER_PW;
}
}
}
}
/*
| | | | 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
pUrlData->flags = urlFlags &= ~URL_REMEMBER_PW;
}
}
}
}
/*
** Parse the given URL, which describes a sync server. Populate variables
** in the global "g" structure as follows:
**
** g.url.isFile True if FILE:
** g.url.isHttps True if HTTPS:
** g.url.isSsh True if SSH:
** g.url.protocol "http" or "https" or "file"
** g.url.name Hostname for HTTP:, HTTPS:, SSH:. Filename for FILE:
** g.url.port TCP port number for HTTP or HTTPS.
** g.url.dfltPort Default TCP port number (80 or 443).
** g.url.path Path name for HTTP or HTTPS.
** g.url.user Userid.
|
| ︙ | ︙ | |||
468 469 470 471 472 473 474 |
const char *zName1, /* First override */
const char *zValue1, /* First override value */
const char *zName2, /* Second override */
const char *zValue2 /* Second override value */
){
const char *zSep = "?";
int i;
| | | 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 |
const char *zName1, /* First override */
const char *zValue1, /* First override value */
const char *zName2, /* Second override */
const char *zValue2 /* Second override value */
){
const char *zSep = "?";
int i;
blob_reset(&p->url);
blob_appendf(&p->url, "%s/%s", g.zTop, p->zBase);
for(i=0; i<p->nParam; i++){
const char *z = p->azValue[i];
if( zName1 && fossil_strcmp(zName1,p->azName[i])==0 ){
zName1 = 0;
z = zValue1;
|
| ︙ | ︙ |