mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
Fixed two peers sending the same attachment at once, Noted the stream limits, Removed the PureBasic-era leftovers
- An attachment is received from one peer at a time: the others are refused NotReady and ask again at their next sync; one cut short lets the next one take it over - A 'replicating' row with all its bytes but never checked is asked again from part 0, and a peer asking from the wrong part resets it - Noted the stream limit (1,048,575 topic/node pairs, 2^43-1 message ids each) in the example config and known-issues.md - Removed NoDefaultTopic (code 6, retired), Writer::vacuum, the v8 detection and the old ini key tests - Cleared the PureBasic-era notes from the docs, revamp.md keeping only the old open items still unfixed; noted the GUI explorer (egui) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -34,16 +34,8 @@
|
||||
; call, BakaShrot_GetLastError() tells why: the codes and what to do about
|
||||
; each are in BakaShrot_ErrorCodes.pbi, next to this file (included below),
|
||||
; BakaShrot_ErrorName() names them; BakaShrot_GetRefusalReasonString() says
|
||||
; why in words.
|
||||
;
|
||||
; Changed from the PureBasic DLL (protocol 6): certificates instead of keys
|
||||
; and a node (BakaShrot_SetCaCertificate(), _SetCertificate(),
|
||||
; _SetPrivateKey() now a PEM key, _SetCrl()); a push always names its topic
|
||||
; (BakaShrot_PushMessage() is gone); no ids (_GetLatestMessage(TopicId,
|
||||
; NodeId), _SetNodeId(), _GetMessageTopicId/NodeId(), _ResolveTopic/Node(),
|
||||
; _GetResolvedName() are gone); _GetNamesList() is
|
||||
; {"kind":"topic","names":[...],"truncated":false}. New: _GetNode().
|
||||
; Attachments: the same six as before, by names.
|
||||
; why in words. _GetNamesList() is
|
||||
; {"kind":"topic","names":[...],"truncated":false}.
|
||||
; ============================================================================
|
||||
|
||||
XIncludeFile "BakaShrot_ErrorCodes.pbi"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
;
|
||||
; What BakaShrot_GetLastError() returns after a failed call of the client DLL
|
||||
; (bakashrot.dll), and the code a server sends with each refusal (protocol 7,
|
||||
; crates/bakashrot-proto/src/error.rs, the same numbers as protocol 6).
|
||||
; crates/bakashrot-proto/src/error.rs).
|
||||
; The Python client has them in bakashrot.ErrorCode. Shipped next to
|
||||
; BakaShrot_Client_Prototypes.pbi, which includes it.
|
||||
;
|
||||
@@ -58,8 +58,6 @@
|
||||
; A message, attachment or query result over a limit, or an attachment
|
||||
; bigger than this server keeps.
|
||||
#BakaShrot_Refused_TooBig = 5
|
||||
; Protocol 6's (a push without a topic): never sent any more.
|
||||
#BakaShrot_Refused_NoDefaultTopic = 6
|
||||
; A request that doesn't fit: an attachment's parts not matching its size,
|
||||
; a part that doesn't exist...
|
||||
#BakaShrot_Refused_InvalidRequest = 7
|
||||
@@ -117,7 +115,6 @@ Procedure.s BakaShrot_ErrorName(Code.l)
|
||||
Case #BakaShrot_Refused_NotFound : ProcedureReturn "NotFound"
|
||||
Case #BakaShrot_Refused_NotReady : ProcedureReturn "NotReady"
|
||||
Case #BakaShrot_Refused_TooBig : ProcedureReturn "TooBig"
|
||||
Case #BakaShrot_Refused_NoDefaultTopic : ProcedureReturn "NoDefaultTopic"
|
||||
Case #BakaShrot_Refused_InvalidRequest : ProcedureReturn "InvalidRequest"
|
||||
Case #BakaShrot_Refused_DataMismatch : ProcedureReturn "DataMismatch"
|
||||
Case #BakaShrot_Refused_QueryFailed : ProcedureReturn "QueryFailed"
|
||||
|
||||
@@ -83,7 +83,6 @@ class ErrorCode(enum.IntEnum):
|
||||
NOT_FOUND = 3 # no such message or attachment
|
||||
NOT_READY = 4 # the attachment isn't on this server yet: retry later
|
||||
TOO_BIG = 5 # over a limit, or more than this server keeps
|
||||
NO_DEFAULT_TOPIC = 6 # protocol 6's, never sent any more
|
||||
INVALID_REQUEST = 7 # a request that doesn't fit (parts out of order...)
|
||||
DATA_MISMATCH = 8 # an upload that doesn't match its SHA-256
|
||||
QUERY_FAILED = 9 # the SQL failed
|
||||
|
||||
Reference in New Issue
Block a user