cd .build/
mkdir build
cd build
-if ! (cmake -B . -S ../src -DCMAKE_BUILD_TYPE=Release -DRESSOURCE_PATH="" && make clean && make -j$(nproc)); then
+if ! (cmake -B . -S ../src -DCMAKE_BUILD_TYPE=Release -DRESSOURCE_PATH="\"\"" && make clean && make -j$(nproc)); then
cd ../..
rm -rf .build
exit 1
DragonnetPeer *client;
-static bool finished = false;
+static volatile bool finished = false;
static bool on_recv(unused DragonnetPeer *peer, DragonnetTypeId type, unused void *pkt)
{
while (client_auth.state == AUTH_INIT)
- ;
+ sched_yield();
return (client_auth.state == AUTH_WAIT) == (type == DRAGONNET_TYPE_ToClientAuth);
}
static void on_disconnect(unused DragonnetPeer *peer)
{
interrupted = true;
+
while (! finished)
- ;
+ sched_yield();
}
static void on_ToClientAuth(unused DragonnetPeer *peer, ToClientAuth *pkt)
#include "signal_handlers.h"
#include "types.h"
-struct ClientAuth client_auth;
+volatile struct ClientAuth client_auth;
static bool name_prompt()
{