Do not show response handler in the rpc.list result

This commit is contained in:
cpq 2023-01-08 06:38:08 +00:00
parent 042465387f
commit 3d75d71767
2 changed files with 2 additions and 0 deletions

View File

@ -3649,6 +3649,7 @@ static size_t print_methods(mg_pfn_t pfn, void *pfn_data, va_list *ap) {
struct mg_rpc *h, **head = (struct mg_rpc **) va_arg(*ap, void **);
size_t len = 0;
for (h = *head; h != NULL; h = h->next) {
if (h->method.len == 0) continue; // Ignore response handler
len += mg_xprintf(pfn, pfn_data, "%s%.*Q", h == *head ? "" : ",",
(int) h->method.len, h->method.ptr);
}

View File

@ -86,6 +86,7 @@ static size_t print_methods(mg_pfn_t pfn, void *pfn_data, va_list *ap) {
struct mg_rpc *h, **head = (struct mg_rpc **) va_arg(*ap, void **);
size_t len = 0;
for (h = *head; h != NULL; h = h->next) {
if (h->method.len == 0) continue; // Ignore response handler
len += mg_xprintf(pfn, pfn_data, "%s%.*Q", h == *head ? "" : ",",
(int) h->method.len, h->method.ptr);
}