Age | Commit message (Collapse) | Author |
|
API:CHANGE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Meson is better on resolving dependencies on various platforms.
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
1. Make SIGINT interrupt the current operation by forcing stdin to listen again (because the spec currently does not specify how to send the final response, so acronc will wait forever in case of invalid commands)
2. Prettify prompt and output.
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Cause:
1. stdin got cmd -> request
2. stdin got EOF -> ac_disconnect -> ac_conn becomes NULL
3. socket got response -> ac_receive(ac_conn) -> crash
Conclusion: ordering issue between ac_disconnect and socket read.
Solution:
Best way: pause the input until command returns
Cons:
1. Lost the advantage of background execution of commands (has to wait until done)
2. It is unreliable to determine if a command is done: although the current server implementation will not send anything else after an error or cmd_result, Minecraft server itself or future server implementations may. The spec does not say anything on termination.
Acronc currently assumes that after receiving an error or cmd_result with the same request ID, it is done. Then, it resumes the stdin, reads the EOF, and then disconnect.
Worse way: Directly call uv_read_stop before ac_disconnect
Cons: It is going to lose anything, including command results. This is particularly undesirable for ad-hoc calls (i.e. echo list | acronc).
Therefore, the current approach is to block and read as much as we can (until error or cmd_result), then stop reading the socket before disconnecting as a double safe.
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
The corresponding CMakeLists.txt files are still rough.
|
|
Still in early development, Windows support is incomplete.
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
API:CHANGE
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
API:CHANGE
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Otherwise ASAN does not seem to run (if terminated).
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
API:ADD
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
WinSock does not use errno.
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
The former approach, strerror(3), is not working on Win32 errors (GetLastError()) or WinSock errors (WSAGetLastError()).
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
API:CHANGE
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
This patch made several changes to correctly build libac on Windows:
1. Deprecated PkgConfig on Unix. On both platforms, libac requires the JSON-C CMake module to locate libraries (whether is dynamic or static) and headers. On Windows, the common practice is to statically link the library, so libac now provides setup.bat to automatically clone JSON-C and build it. In CMakeLists.txt, libac will automatically pick up the in-tree JSON-C build if it presents. Otherwise, it will use the system default's. Users can override the CMAKE_PREFIX_PATH to supply a custom JSON-C library if it is not found in-tree.
2. Switched from #include <json-c/xxx.h> to <xxx.h>, as the former (current) approach is non-standard and depends on the system header locations. The later (new) approach relies on CMake to supply header search paths, which works on Windows as well.
3. Deprecated --version-script on Unix linkers. Instead, libac now uses -fvisibility (https://gcc.gnu.org/wiki/Visibility) on GCC or LLVM, as well as __declspec(dllexport) on MSVC to export selected symbols. A new macro, LIBAC_EXPORT, is defined in incl.h (new), and all functions needed to export are marked with that macro.
4. Changed several codes (mostly socket-related) to work on Windows.
5. Massive rewrite of CMake in preparation of further installation and static library support.
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
|
|
|