summaryrefslogtreecommitdiffstats
path: root/src/server/rpc.c
Commit message (Collapse)AuthorAgeFilesLines
* [SERVER] Fix UBSimon Rettberg2021-05-111-1/+1
|
* [BUILD] Include branch and build timestamp in binariesSimon Rettberg2020-12-021-1/+1
|
* [SERVER] Fix warningsSimon Rettberg2020-11-231-2/+2
|
* [BUILD] add CMake targets to build binary and source packages with CPackManuel Bentele2020-10-221-2/+3
| | | | | | | | | | | This patch adds the following CMake targets - package - source to build bundeled packages. Those packages contain either all built binary artifacts or all source files for source code distribution. Both CMake targets are available in Release build configuration.
* [BUILD] set build type and stop Release build if repository is dirtyManuel Bentele2020-10-191-2/+2
|
* [BUILD] rewrite CMake build system to track changes of source filesManuel Bentele2020-10-161-6/+6
| | | | | | | | | | This change restructures the source code directories, separates shared form non-shared application code and adds CMake dependencies. These dependencies allow the tracking of changes and trigger a rebuild of those build targets where changed files are involved. WARNING: Note that the support of the DNBD3_SERVER_AFL build option is not supported yet. Thus, the option should be never turned on.
* [SERVER] Shorter wait when closing socket after replySimon Rettberg2020-03-191-0/+2
|
* [SERVER] Include build type and version in RPCSimon Rettberg2020-03-171-2/+8
| | | | Added new query type q=version, which uses the STATS access rights.
* [SERVER] Handle "warn unused result" casesSimon Rettberg2020-03-061-1/+1
|
* [SERVER] Fix another nullpointer accessSimon Rettberg2019-10-301-1/+3
|
* [SERVER] rpc: Fix warningsSimon Rettberg2019-09-111-2/+2
|
* [SERVER] rpc: Add cachemap featureSimon Rettberg2019-09-061-0/+44
|
* [SERVER] Make signal handling more POSIXSimon Rettberg2019-08-281-5/+8
| | | | | | | | | | | | | | | According to POSIX, a signal sent to a PID can be delivered to an arbitrary thread of that process that hasn't the signal blocked. This seens to never happen on Linux, but would mess things up since the code expected the main signal handler to only be executed by the main thread. This should now be fixed by examining the destination PID of the signal as well as the ID of the thread currently running the signal handler. If we notice the signal wasn't sent by our own PID and the handler is not currently run by the main thread, we re-send the signal to the main thread. Otherwise, if the signal was sent by our own PID but the handler is not run in the main thread, do nothing. This way we can use pthread_kill() to wake up threads that might be stuck in a blocking syscall when it's time to shut down.
* [SERVER] Better lock debugging: Always check lock orderSimon Rettberg2019-08-071-11/+3Star
| | | | | | Lock order is predefined in locks.h. Immediately bail out if a lock with lower priority is obtained while the same thread already holds one with higher priority.
* [SERVER] Turn all spinlocks into mutexesSimon Rettberg2019-07-261-17/+17
| | | | | | | | Just assume sane platforms offer smart mutexes that have a fast-path with spinlocks internally for locks that have little to no congestion. In all other cases, mutexes should perform better anyways.
* [SERVER] Fix json format stringSimon Rettberg2018-11-161-1/+1
| | | | Don't drop runId
* [SERVER] rpc: Distinguish between client and server (proxy) connectionsSimon Rettberg2018-08-141-2/+3
|
* [SERVER] Use atomic var for (total)bytesSent countersSimon Rettberg2018-08-081-13/+8Star
| | | | | | Gets rid of the lastBytesSent field as well as the stats lock per client. Cleaned and split up the messy net_clientsToJson function while at it.
* [SERVER] jansson < 2.6 compatSimon Rettberg2017-11-101-0/+5
|
* [SERVER] rpc: Add q=logfile, q=altservers and q=config to /querySimon Rettberg2017-11-081-0/+36
|
* [SERVER] Add --errormsg to only serve HTTP-JSON error codeSimon Rettberg2017-11-021-0/+13
| | | | | This could have been an external tool, but this didn't add much code and has the benefit of honoring the config file for port and bind address.
* [SERVER] rpc: Keep track of and cap number of active http sessionsSimon Rettberg2017-11-011-11/+57
|
* [SERVER] rpc: Remove old TODO, set thread name for persistent connectionsSimon Rettberg2017-11-011-1/+5
|
* [SERVER] rpc: encoding of our reply is utf-8, add to reply headerSimon Rettberg2017-10-301-1/+1
|
* [SERVER] Add AFL supportSimon Rettberg2017-10-301-0/+11
| | | | | | | | | | | AFL is an instrumenting fuzzer. It expects to pass input to the program to be tested via command line (file name) or via stdin. This adds support for reading messages that normally would arrive via network directly from stdin. In this mode, the server is pretty useless otherwise. http://lcamtuf.coredump.cx/afl/
* [SERVER] rpc: Honor client's Connection header, add some commentsSimon Rettberg2017-10-301-35/+106
|
* [SERVER] Don't send error 500 to client on local connection timeoutSimon Rettberg2017-10-301-1/+3
|
* [*] Introduce constants for IPv4/6 in dnbd3_host_tSimon Rettberg2017-10-281-2/+2
| | | | | | | AF_INET luckily was "2" on all platforms checked, so no problems there with interoperation, but AF_INET6 is different between Linux, BSD, Windows and possibly others, so map back and forth between AF_INET/AF_INET6 and HOST_IP4/HOST_IP6 to fix this.
* [SERVER] Add function to parse x-www-form-urlencoded stringsSimon Rettberg2017-10-281-25/+46
| | | | | | Use it to properly parse RPC queries. Will also come in handy when parsing POST body for calls that actually trigger any actions in the server (reload, alt-servers, ...)
* [SERVER] Use picohttpparser from h2oSimon Rettberg2017-10-261-48/+55
| | | | | | | Simple and lean interface, no bloat, noice. Slighly modified to use a simple string struct for passing around strings that are not null terminated, instead of separate char* and length.
* [SERVER] Fix types or add explicit casts everywhere we might have type ↵Simon Rettberg2017-10-241-2/+2
| | | | conversion problems
* [SERVER] rpc: Support querying storage size + available spaceSimon Rettberg2017-10-111-1/+13
|
* [SERVER] rpc: Return a unique id generated at startup with each replySimon Rettberg2017-10-061-4/+19
|
* [SERVER] Return client count when requesting stats but not client listSimon Rettberg2017-10-061-3/+7
|
* [SERVER] rpc: Fix bitmask calc for odd subnet sizes (not 8, 16, ...)Simon Rettberg2017-10-041-1/+1
|
* [SERVER] Implement HTTP RPC that supports different queries and ACLSimon Rettberg2017-10-011-22/+241
| | | | | | | | | - ACL is defined in new file rpc.acl - Queries are still WIP, for now something like /query?q=stats&q=images /query?q=clients works, although the parsing is still ugly - Also supports HTTP keep-alive
* [SERVER] Refactor: Move client list to net.* and isolateSimon Rettberg2017-09-071-47/+3Star
|
* cleanup commitsSebastian2016-02-111-9/+2Star
|
* [SERVER] Fix a lot of (mostly harmless) data racesSimon Rettberg2016-01-111-15/+15
|
* [SERVER] More fine grained locking for RPC; better error loggingSimon Rettberg2015-12-161-16/+45
|
* [SERVER] Update includes for moved log.hSimon Rettberg2015-12-021-1/+1
|
* [FUSE] Mid-refactoring, does not compileSimon Rettberg2015-11-241-1/+1
|
* [SERVER] Renamed image_fillJson to image_getListAsJson.Stephan Schwaer2015-05-081-1/+1
|
* [SERVER] Rename some more RPC fieldsSimon Rettberg2015-05-081-1/+1
|
* [SERVER] Add image ID for easier handling in RPC, export RID via RPC, make ↵Simon Rettberg2015-05-081-8/+10
| | | | names of the byte count fields in RPC consistent
* [SERVER] Fix premature connection close for RPC repliesSimon Rettberg2015-05-051-7/+10
|
* [Server] Added statistics of images and uptime to json.Stephan Schwaer2015-05-051-10/+14
|
* Removed dnbd3_printClients, added clients to statistics json in rpc.Stephan Schwaer2015-05-041-10/+47
|
* [SERVER] PoC RPC interfaceschwaers2015-04-301-0/+18
|
* Rewriting....sr2013-07-081-810/+0Star
|