# HG changeset patch # User Mike Becker # Date 1786961691 -7200 # Node ID ef8c39362342b9d0c903d986a4aada1b647d7284 # Parent e0e061cf482996a584e862950a821cf6d8d421c3 split DECLINE message into DECLINE and DECLINE_MOVE resolves #937 diff -r e0e061cf4829 -r ef8c39362342 src/main.c --- a/src/main.c Mon Aug 17 12:01:19 2026 +0200 +++ b/src/main.c Mon Aug 17 12:14:51 2026 +0200 @@ -619,7 +619,7 @@ * the network response code, but we choose not to do it */ gamestate->checkmate = code == NETCODE_CHECKMATE; gamestate->stalemate = code == NETCODE_STALEMATE; - if (code == NETCODE_DECLINE) { + if (code == NETCODE_DECLINE_MOVE) { uint32_t reason; net_recieve_data(opponent, &reason, sizeof(uint32_t)); reason = ntohl(reason); @@ -802,7 +802,7 @@ } } else { uint32_t reason = htonl(code); - net_send_data(opponent, NETCODE_DECLINE, + net_send_data(opponent, NETCODE_DECLINE_MOVE, &reason, sizeof(uint32_t)); } break; diff -r e0e061cf4829 -r ef8c39362342 src/network.h --- a/src/network.h Mon Aug 17 12:01:19 2026 +0200 +++ b/src/network.h Mon Aug 17 12:14:51 2026 +0200 @@ -39,6 +39,7 @@ #define NETCODE_ACCEPT 0x02 #define NETCODE_DECLINE 0x04 +#define NETCODE_DECLINE_MOVE 0x05 #define NETCODE_GAMEINFO 0x10 #define NETCODE_PGNDATA 0x11 #define NETCODE_MOVE 0x20 @@ -54,7 +55,7 @@ #define NETCODE_CONNLOST 0x80 #define NETCODE_ERROR 0xFF -#define NETCODE_VERSION 21 +#define NETCODE_VERSION 22 typedef struct { int fd; /* -1, if we are the client */