summaryrefslogtreecommitdiff
path: root/lib9p/protogen/c.py
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-08 20:54:56 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-13 02:29:43 -0600
commitd2afc58a861ba9d5a1add97d42a3b5aaa0536450 (patch)
treeb050fe2492516bb8199d3841bad3920bab952c39 /lib9p/protogen/c.py
parentfc115b98c8c41e0e76319839c0227d8f44381394 (diff)
lib9p: srv: Drop the sess->rerror_overhead field
Diffstat (limited to 'lib9p/protogen/c.py')
-rw-r--r--lib9p/protogen/c.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib9p/protogen/c.py b/lib9p/protogen/c.py
index a6824ce..363f0df 100644
--- a/lib9p/protogen/c.py
+++ b/lib9p/protogen/c.py
@@ -122,6 +122,11 @@ def gen_c(versions: set[str], typs: list[idl.UserType]) -> str:
ret += f"const struct {c9util.ident('_ver_tentry')} {c9util.ident('_table_ver')}[{c9util.ver_enum('NUM')}] = {{\n"
rerror = next(typ for typ in typs if typ.typname == "Rerror")
for ver in ["unknown", *sorted(versions)]:
+ # XXX: There are good arguments that min_msg_size should be
+ # something larger than rerror.min_size().
+ # srv.c:respond_error() assumes that min_msg_size is
+ # rerror.min_size(); if you do change min_msg_size to
+ # something larger, then be sure to update respond_error().
if ver == "unknown":
min_msg_size = rerror.min_size("9P2000") # SPECIAL (initialization)
else: