Fossil

Check-in [e4ca60cd]
Login

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

Overview
Comment:If the login fails during a clone or sync, fail the command immediately rather than reprompting for a new password, as the sync is going to eventually fail anyhow.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e4ca60cd4920133f00c7454b98150fef5ba76669cece9650d5c8998ad191a419
User & Date: drh 2019-03-25 12:13:15.571
Context
2019-03-25
14:02
Check for the presence of BIO_ADDR_hostname_string before using it. ... (check-in: 0ef9501c user: andybradford tags: trunk)
12:13
If the login fails during a clone or sync, fail the command immediately rather than reprompting for a new password, as the sync is going to eventually fail anyhow. ... (check-in: e4ca60cd user: drh tags: trunk)
11:31
Use the BIO_ADDR_hostname_string() function from OpenSSL to obtain the IP address of the remote side, if that function is available. ... (check-in: 8a4ad5cb user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/xfer.c.
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
      */
      if( blob_eq(&xfer.aToken[0],"error") && xfer.nToken==2 ){
        if( (syncFlags & SYNC_CLONE)==0 || nCycle>0 ){
          char *zMsg = blob_terminate(&xfer.aToken[1]);
          defossilize(zMsg);
          fossil_force_newline();
          fossil_print("Error: %s\n", zMsg);
          if( fossil_strcmp(zMsg, "login failed")==0 ){
            if( nCycle<2 ){
              g.url.passwd = 0;
              go = 1;
              if( g.cgiOutput==0 ){
                g.url.flags |= URL_PROMPT_PW;
                g.url.flags &= ~URL_PROMPTED;
                url_prompt_for_password();
                url_remember();
              }
            }else{
              nErr++;
            }
          }else{
            blob_appendf(&xfer.err, "server says: %s\n", zMsg);
            nErr++;
          }
          break;
        }
      }else

      /* Unknown message */
      if( xfer.nToken>0 ){
        if( blob_str(&xfer.aToken[0])[0]=='<' ){







<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<







2286
2287
2288
2289
2290
2291
2292














2293
2294

2295
2296
2297
2298
2299
2300
2301
      */
      if( blob_eq(&xfer.aToken[0],"error") && xfer.nToken==2 ){
        if( (syncFlags & SYNC_CLONE)==0 || nCycle>0 ){
          char *zMsg = blob_terminate(&xfer.aToken[1]);
          defossilize(zMsg);
          fossil_force_newline();
          fossil_print("Error: %s\n", zMsg);














          blob_appendf(&xfer.err, "server says: %s\n", zMsg);
          nErr++;

          break;
        }
      }else

      /* Unknown message */
      if( xfer.nToken>0 ){
        if( blob_str(&xfer.aToken[0])[0]=='<' ){