Skip to content
Snippets Groups Projects
  1. Apr 17, 2021
    • Rob Swindell's avatar
      Restore the user-to-user file transfer feature · be1ac465
      Rob Swindell authored
      I forget who it was that said they were still using this feature in v3.18, but here you go, it's working again (the /D and /U commands). I'm not migrating any file sender/recipient info from v3.18, so only files added after upgrading to this will be downloadable from the "user" directory (if you have one).
      
      Something that I never implemented before but noticed is missing is the removal (or dereferencing) of user-to-user files that were sent from/to a user that is then deleted. So that's still a TODO item.
      be1ac465
    • Rob Swindell's avatar
      Fix TypeError: file_area.lib_list[i].dir is undefined · b53e66d3
      Rob Swindell authored
      dir is not a property of lib_list[], appears to be a typo.
      
      Also, in the "lib" scope commands, j was not defined.
      
      The offline_dir property appears to have been deprecated (no longer
      enumerable) years ago, in favor of the dir/dir_list[].is_offline
      property, so use that property instead for skipping offline dirs.
      Reported by xbit (XBITBBS)
      
      Also, make sure the ;upload and other lib/all search commands are
      abortable with Ctrl-C.
      b53e66d3
  2. Apr 16, 2021
  3. Apr 15, 2021
  4. Apr 14, 2021
    • Rob Swindell's avatar
      Refactor putuserrec() · ba418fdb
      Rob Swindell authored
      This started with a Coverity issue (CID 33230) which got me looking at this function and wondering: why is str2 being NUL-terminated here? Why is the length of str2 to be calculated on successive lines? What is with this (long)((long)((long)((long)) typecast?
      
      This was some of the oldest code in Synchronet (along with a lot of the other functions in this file). I tried to keep as much intact as possible while still improving the logic and readability.
      ba418fdb
    • Rob Swindell's avatar
      Add/use P_REMOTE print-mode flag to bputs() · 3873a36c
      Rob Swindell authored
      Do nothing if online != ON_REMOTE. Eliminates some if(online == ON_REMOTE) clauses.
      3873a36c
    • Rob Swindell's avatar
      Debug the "thread_back field missing" error · dbed82c6
      Rob Swindell authored
      Some QWKnet vote messages are failing:
      evnt unpackREP <ENSEMBLE> !ERROR 2 (No such file or directory) in qwk.cpp line 1146 (qwk_vote) writing "/sbbs/data/subs/dove-gen" access=-105 info=smb_addvote thread_back field missing
      
      Catch this problem a little higher up (in votemsg()) and log the message's reply-IDs to help determine what's the root-cause here. Don't bother calling smb_addvote() if thread_back is 0.
      dbed82c6
  5. Apr 13, 2021
  6. Apr 12, 2021
  7. Apr 10, 2021
  8. Apr 08, 2021
    • Rob Swindell's avatar
      Pretty much a complete re-write and still a work-in-progress, but useful · 7e909925
      Rob Swindell authored
      The biggest difference is that you can combine all files from multiple dirs
      into a single sorted list and you can sort on any property (field) value.
      
      The byte/credit format is very customizeable, the output format is completely
      customizeable.
      
      By default, just the filenames are output, but either use '-ext' or one or
      more '-v' values to add more fields. Use -p=list to specify a comma-separated
      list of properties to print.
      7e909925
    • Rob Swindell's avatar
      When bytes is falsey and size is > 0 but < 1000*1024 don't return "0K" · 7cd1d79a
      Rob Swindell authored
      Instead, return the fractional size in KB's with 2 digits of precision.
      
      Fixed up some of the variable names.
      7cd1d79a
    • Deucе's avatar
      Fix sizeof() target. · b0aaf98f
      Deucе authored
      b0aaf98f
    • Deucе's avatar
      When a callback event is handled, get remote_addr · c45983f3
      Deucе authored
      Prevents weird issues with getting remote address.
      c45983f3
    • Rob Swindell's avatar
      Sorted loadfiles() results were corrupted when detail was < normal · 57142e69
      Rob Swindell authored
      When only reading the index (detail = file_detail_index), smb_getfile() just sets the file->name convenience pointer to point to the name in the index. Then when loadfiles() would sort the list, these pointers would not be adjusted (so they would point to the wrong names) resulting in a corrupted file list (e.g. name/size mismatches and no logical sort order).
      
      The solution is to call smb_getfile() on each file *after* the read index records have been sorted.
      
      This also means that the sort-by-name routines needed to always sort using the index name and not the convenience pointer (which is NULL in this case).
      
      While fixing this, I noticed there was no bounds checking in the loadfiles() and loadfilenames() read-loops, so if the indexes happened to be longer than the total_files value from the status header, a buffer under-alloc/overflow would occur and a likely crash as a result. So stop reading the index when the expected maximum number of index records have been read.
      57142e69
  9. Apr 07, 2021
Loading