Services: threadperclient, a thread for each client where one is needed

A flag of the service for what cannot share a thread between clients,
once clients can be served otherwise: what waits other than in
sockpoll(), or a thread which may be unable to serve another client.
It is set for a service
- with FilePlugin, whose _prepoll writes files and sends them;
- with a -ne network namespace: a thread which failed to come back from
  it to the main namespace is not to serve another client;
- writing to an ODBC log, should the log have no thread of its own to
  write it: struct logtype has blocks, for a log waiting other than in
  sockpoll().

Nothing serves clients otherwise yet: as before, each has a thread.

Incompatible for plugins, which have to be built again with the same
version of 3proxy: struct srvparam has threadperclient, struct logtype
has blocks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Vladimir DubrovinandClaude Opus 5.5 committed 2026-10-24 19:54:03 +03:00
1 parent b4bbcb9e9a
commit 3e7f749eb6
4 files changed
+12 -1

No files matched your search

+3
View File
@@ -767,7 +767,10 @@ static int fp_registercallback (int what, int max_size, int preview_size, struct
}
/* Its _prepoll writes the files and sends them: the service's clients each
have a thread. */
static void * fp_open(void * idata, struct srvparam * param){
param->threadperclient = 1;
return idata;
}