Closed illwieckz closed 7 years ago
There's nothing to stop you using multiple queries with fall-back though them to ensure you get a response.
Yes, but I did not understand how to do that! :/
In tee.c
I tried something like that:
int len_tee_statuspacket = 14;
int len_tee_statuspacke2 = 15;
int len_tee_statuspacke3 = 15;
char tee_statuspacket[14] = { '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', 'g', 'i', 'e', 'f' };
char tee_statuspacke2[15] = { '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', 'g', 'i', 'e', '2', '\x00' };
char tee_statuspacke3[15] = { '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', '\xFF', 'g', 'i', 'e', '3', '\x00' };
query_status_t send_tee_request_packet( struct qserver *server )
{
query_status_t ret_packet;
// Try first then second then third...
ret_packet = send_packet( server, tee_statuspacket, len_tee_statuspacket );
if (ret_packet < 0)
{
ret_packet = send_packet( server, tee_statuspacke2, len_tee_statuspacke2 );
}
if (ret_packet < 0)
{
ret_packet = send_packet( server, tee_statuspacke3, len_tee_statuspacke3 );
}
return ret_packet;
}
But it is certainly not the way to do it. I suppose it must be done elsewhere, in the function calling send_tee_request_packet
for example.
You could send all three packets like your doing then processes the return ensuring you pick the right decode.
OK, it needed only to do that:
- if (ret_packet < 0)
+ if (ret_packet == INPROGRESS)
:innocent:
You can try with
./qstat -tees 81.30.158.57:8299
or with:
./qstat -default tees -f /tmp/teelist.txt
where /tmp/teelist.cfg
is http://pastebin.com/MALPwk7k
Teeworlds support is broken since many years. I have some experimental code on my computer but I faced a big problem: