Changes On Branch msw-hack
Not logged in

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

Changes In Branch msw-hack Excluding Merge-Ins

This is equivalent to a diff from 8d703ff956 to a67e2683ed

2011-09-08
13:02
Merge fixes and refactoring from symlinks branch. check-in: c05f6afaf2 user: dmitry tags: trunk
11:52
Merge latest trunk into symlinks branch. check-in: 981e5c62e3 user: dmitry tags: symlinks
2011-09-07
08:12
Make it easier to use Events as quick notes: Display the title just above the text on Event pages. If there's no title in the wiki text, use the comment as a title. Leaf check-in: 27a4518e13 user: ben tags: ben-minorchanges
03:51
begin work on ticket [bc0d0f5642eaf]: track success of (network) write operations and start bubbling that status up. To make it up to ultimately exit(EXIT_FAILURE) on errors, mkindex will need to be updated, too, as well as the signature from command implementing functions need to return int instead of void at some point. More to come. Leaf check-in: a67e2683ed user: martin.weber tags: msw-hack
2011-09-06
20:12
catch up with trunk. Remove C++ style comments from http_ssl.c. check-in: 0f1c41bc20 user: martin.weber tags: msw-hack
13:23
Close A and LI tags when displaying new and deleted files in timeline. check-in: 8d703ff956 user: dmitry tags: trunk
2011-09-04
01:28
Update the built-in SQLite to the latest 3.7.8-alpha version that contains the improved merge-sort logic. check-in: 0cf5416002 user: drh tags: trunk

Changes to src/http.c.

   188    188       transport_log(out);
   189    189       free(zOutFile);
   190    190     }
   191    191   
   192    192     /*
   193    193     ** Send the request to the server.
   194    194     */
   195         -  transport_send(&hdr);
   196         -  transport_send(&payload);
          195  +  if (transport_send(&hdr))
          196  +	goto write_err;
          197  +  if (transport_send(&payload))
          198  +	goto write_err;
   197    199     blob_reset(&hdr);
   198    200     blob_reset(&payload);
   199    201     transport_flip();
   200    202     
   201    203     /*
   202    204     ** Read and interpret the server reply
   203    205     */

Changes to src/http_ssl.c.

   247    247       BIO_puts(mem, "\n\nSHA1 Fingerprint:\n\n ");
   248    248       if(X509_digest(cert, EVP_sha1(), md, &mdLength)){
   249    249         int j;
   250    250         for( j = 0; j < mdLength; ++j ) {
   251    251           BIO_printf(mem, " %02x", md[j]);
   252    252         }
   253    253       }
   254         -    BIO_write(mem, "", 1); // null-terminate mem buffer
          254  +    BIO_write(mem, "", 1); /* null-terminate mem buffer */
   255    255       BIO_get_mem_data(mem, &desc);
   256    256       
   257    257       if( hasSavedCertificate ){
   258    258         warning = "WARNING: Certificate doesn't match the "
   259    259                   "saved certificate for this host!";
   260    260       }
   261    261       prompt = mprintf("\nUnknown SSL certificate:\n\n%s\n\n%s\n"
................................................................................
   302    302   */
   303    303   void ssl_save_certificate(X509 *cert){
   304    304     BIO *mem;
   305    305     char *zCert, *zHost;
   306    306   
   307    307     mem = BIO_new(BIO_s_mem());
   308    308     PEM_write_bio_X509(mem, cert);
   309         -  BIO_write(mem, "", 1); // null-terminate mem buffer
          309  +  BIO_write(mem, "", 1); /* null-terminate mem buffer */
   310    310     BIO_get_mem_data(mem, &zCert);
   311    311     zHost = mprintf("cert:%s", g.urlName);
   312    312     db_set(zHost, zCert, 1);
   313    313     free(zHost);
   314    314     BIO_free(mem);  
   315    315   }
   316    316   

Changes to src/http_transport.c.

   257    257       }
   258    258       transport.isOpen = 0;
   259    259     }
   260    260   }
   261    261   
   262    262   /*
   263    263   ** Send content over the wire.
          264  +** Returns whether sending was errant, i.e.,
          265  +** the count of bytes written onto the wire does
          266  +** not equal the size of the blob being sent.
   264    267   */
   265         -void transport_send(Blob *toSend){
          268  +int transport_send(Blob *toSend){
   266    269     char *z = blob_buffer(toSend);
   267    270     int n = blob_size(toSend);
   268         -  transport.nSent += n;
          271  +  size_t written = 0;
   269    272     if( g.urlIsSsh ){
   270         -    int sent;
   271         -    sent = fwrite(z, 1, n, sshOut);
          273  +    written = fwrite(z, 1, n, sshOut);
   272    274       fflush(sshOut);
   273         -    /* printf("sent %d of %d bytes\n", sent, n); fflush(stdout); */
          275  +    /* printf("sent %d of %d bytes\n", (unsigned long) written, n); fflush(stdout); */
   274    276     }else if( g.urlIsHttps ){
   275    277       #ifdef FOSSIL_ENABLE_SSL
   276    278       int sent;
   277    279       while( n>0 ){
   278    280         sent = ssl_send(0, z, n);
   279    281         /* printf("Sent %d of %d bytes\n", sent, n); fflush(stdout); */
   280    282         if( sent<=0 ) break;
   281    283         n -= sent;
          284  +      written += sent;
   282    285       }    
   283    286       #endif
   284    287     }else if( g.urlIsFile ){
   285         -    fwrite(z, 1, n, transport.pFile);
          288  +    written = fwrite(z, 1, n, transport.pFile);
          289  +    /* printf("written %d of %d bytes\n", (unsigned long) written, n); fflush(stdout); */
   286    290     }else{
   287    291       int sent;
   288    292       while( n>0 ){
   289    293         sent = socket_send(0, z, n);
   290    294         /* printf("Sent %d of %d bytes\n", sent, n); fflush(stdout); */
   291    295         if( sent<=0 ) break;
   292    296         n -= sent;
          297  +      written += sent;
   293    298       }
   294    299     }
          300  +  transport.nSent += written;
          301  +  return (blob_size(toSend) != written);
   295    302   }
   296    303   
   297    304   /*
   298    305   ** This routine is called when the outbound message is complete and
   299    306   ** it is time to being recieving a reply.
   300    307   */
   301    308   void transport_flip(void){

Changes to src/xfer.c.

  1711   1711   
  1712   1712       /* Stop the cycle if the server sends a "clone_seqno 0" card and
  1713   1713       ** we have gone at least two rounds.  Always go at least two rounds
  1714   1714       ** on a clone in order to be sure to retrieve the configuration
  1715   1715       ** information which is only sent on the second round.
  1716   1716       */
  1717   1717       if( cloneSeqno<=0 && nCycle>1 ) go = 0;   
  1718         -  };
         1718  +  }
  1719   1719     transport_stats(&nSent, &nRcvd, 1);
  1720   1720     fossil_print("Total network traffic: %lld bytes sent, %lld bytes received\n",
  1721   1721                  nSent, nRcvd);
  1722   1722     transport_close();
  1723   1723     transport_global_shutdown();
  1724   1724     db_multi_exec("DROP TABLE onremote");
  1725   1725     manifest_crosslink_end();
  1726   1726     content_enable_dephantomize(1);
  1727   1727     db_end_transaction(0);
  1728   1728     return nErr;
  1729   1729   }