Fossil

Check-in [92b5cc21ce]
Login

Check-in [92b5cc21ce]

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

Overview
Comment:Resolved /chat-poll crash when xfrom is null, as described in [forum:/forumpost/e0be0eeb4c | forum post e0be0eeb4c].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 92b5cc21ce90053f4272c2e3a23e1fa459dfee36093079fb28540a54731d3903
User & Date: stephan 2021-04-07 02:35:38.925
Context
2021-04-07
07:35
/chat-send now uses the user name 'nobody' for guest-user posts. See [forum:/forumpost/e0be0eeb4c | forum post e0be0eeb4c] for details. ... (check-in: 5312f3738e user: stephan tags: trunk)
02:35
Resolved /chat-poll crash when xfrom is null, as described in [forum:/forumpost/e0be0eeb4c | forum post e0be0eeb4c]. ... (check-in: 92b5cc21ce user: stephan tags: trunk)
2021-04-06
10:47
The "fossil open" command now tolerates the repository file being in the check-out directory without requiring the -f flag. See [forum:/forumpost/bc5f8f6e59|forum post bc5f8f6e59] for the discussion. ... (check-in: 61132cefac user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/chat.c.
596
597
598
599
600
601
602





603

604

605
606
607
608
609
610
611
        blob_append(&json, ",\n", 2);
      }
      blob_appendf(&json, "{\"msgid\":%d,", id);
      blob_appendf(&json, "\"mtime\":\"%.10sT%sZ\",", zDate, zDate+11);
      if( zLMtime && zLMtime[0] ){
        blob_appendf(&json, "\"lmtime\":%!j,", zLMtime);
      }





      blob_appendf(&json, "\"xfrom\":%!j,", zFrom);

      blob_appendf(&json, "\"uclr\":%!j,", user_color(zFrom));


      zMsg = chat_format_to_html(zRawMsg ? zRawMsg : "");
      blob_appendf(&json, "\"xmsg\":%!j,", zMsg);
      fossil_free(zMsg);

      if( nByte==0 ){
        blob_appendf(&json, "\"fsize\":0");







>
>
>
>
>
|
>
|
>







596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
        blob_append(&json, ",\n", 2);
      }
      blob_appendf(&json, "{\"msgid\":%d,", id);
      blob_appendf(&json, "\"mtime\":\"%.10sT%sZ\",", zDate, zDate+11);
      if( zLMtime && zLMtime[0] ){
        blob_appendf(&json, "\"lmtime\":%!j,", zLMtime);
      }
      blob_append(&json, "\"xfrom\":", -1);
      if(zFrom){
        blob_appendf(&json, "%!j,", zFrom);
      }else{
        /* see https://fossil-scm.org/forum/forumpost/e0be0eeb4c */
        blob_appendf(&json, "null,");
      }
      blob_appendf(&json, "\"uclr\":%!j,",
                   user_color(zFrom ? zFrom : "nobody"));

      zMsg = chat_format_to_html(zRawMsg ? zRawMsg : "");
      blob_appendf(&json, "\"xmsg\":%!j,", zMsg);
      fossil_free(zMsg);

      if( nByte==0 ){
        blob_appendf(&json, "\"fsize\":0");