Commit graph

2476 commits

Author SHA1 Message Date
Dennis Felsing 925f7b6325 Fix weird Windows compilation 2018-08-29 11:32:36 +02:00
Dennis Felsing a63f210a01 Fix segfault when deleting lock 2018-08-29 10:32:12 +02:00
Dennis Felsing c29a72eb70 Lock style 2018-08-27 16:36:36 +02:00
Dennis Felsing 4d634bb7fd Global lock for MySQL Connector's get_driver_instance
See note in https://dev.mysql.com/doc/connector-cpp/1.1/en/connector-cpp-examples-connecting.html

> get_mysql_driver_instance() calls get_driver_instance(), which is not
> thread-safe. Either avoid invoking these methods from within multiple
> threads at once, or surround the calls with a mutex to prevent
> simultaneous execution in multiple threads.
2018-08-27 09:42:37 +02:00
def 48d1757793 Fix bw support 2018-08-26 21:21:27 +02:00
Dennis Felsing 03098af933 Fix dnsbl initialization
Don't set dnsbl state to pending when we someone connects over ipv6 and
the init will fail, leaving a null pointer in m_pDnsblLookup
2018-08-24 14:24:34 +02:00
Dennis Felsing 39b36b2c3b Check file system operations and log them 2018-08-23 09:58:35 +02:00
Dennis Felsing 20ea1651cb Don't save non-client configs 2018-08-23 09:57:48 +02:00
Dennis Felsing e295a121e4 DDNET_INFO(_TMP) 2018-08-23 09:57:35 +02:00
Dennis Felsing 29dd3e29f7 Read ddnet-info.json from correct location 2018-08-23 09:36:20 +02:00
Dennis Felsing e2eb4a66dc Add Filter for connecting players (fixes #1263) 2018-08-21 09:03:48 +02:00
heinrich5991 2ad4c86632 Fix a typo 2018-08-13 21:35:49 +02:00
Dennis Felsing 0b539df741 bw 2018-08-09 13:05:36 +02:00
Dennis Felsing dda2b06672
Merge pull request #1235 from fokkonaut/master
block worlds zoom + eye wheel
2018-08-09 13:04:07 +02:00
Jupeyy 29ecaa2c2a brace 2018-08-02 20:58:43 +02:00
Jupeyy bc013513bc don't restore the config variable in this case 2018-08-02 20:56:29 +02:00
Jupeyy 7ce29e7a1a Properly reset context attributes, if OpenGL3 context failed to create 2018-08-02 20:52:51 +02:00
Jupeyy d7bb03ee19 don't render all border all the time 2018-08-02 18:26:12 +02:00
def 18529fa082 Revert "Implement recvmmsg"
This reverts commit de5fe64be5.
2018-07-29 23:07:59 +02:00
fokkonaut 2dafafd75b oops, tab instead of spaces 2018-07-27 23:32:10 +02:00
fokkonaut cd5d69bfc5 added bw to isddnet 2018-07-27 23:28:02 +02:00
fokkonaut b8730b3653 block worlds zoom + eye wheel 2018-07-26 21:34:24 +02:00
heinrich5991 e8c7dca035 Fix storage.cfg reading broken by the str_startswith change 2018-07-26 15:46:54 +02:00
heinrich5991 5c4e819e44 Use str_startswith, str_endswith instead of ad-hoc implementations 2018-07-26 14:18:23 +02:00
Dennis Felsing de5fe64be5 Implement recvmmsg 2018-07-25 16:06:00 +02:00
bors[bot] e571dc8d93 Merge #1200
1200: Share libcurl resources across requests r=def- a=heinrich5991

Use the libcurl-share interface to share DNS cache and connections
between different requests.

If compiled with OpenSSL, libcurl can only be safely used from multiple
threads for OpenSSL >= 1.1.0, but this problem is not newly introduced
by this commit: According to libcurl-thread(3):

>OpenSSL <= 1.0.2 the user must set callbacks.
>
>https://www.openssl.org/docs/man1.0.2/crypto/threads.html#DESCRIPTION
>
>https://curl.haxx.se/libcurl/c/opensslthreadlock.html

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2018-07-19 09:15:10 +00:00
Isaac Zhao 83ae953b21
Fixed hidpi resolution issue on macOS 2018-07-17 07:46:17 +00:00
heinrich5991 8d04e7e5e1 Share libcurl resources across requests
Use the libcurl-share interface to share DNS cache and connections
between different requests.

If compiled with OpenSSL, libcurl can only be safely used from multiple
threads for OpenSSL >= 1.1.0, but this problem is not newly introduced
by this commit: According to libcurl-thread(3):

>OpenSSL <= 1.0.2 the user must set callbacks.
>
>https://www.openssl.org/docs/man1.0.2/crypto/threads.html#DESCRIPTION
>
>https://curl.haxx.se/libcurl/c/opensslthreadlock.html
2018-07-11 20:17:21 +02:00
yangfl 81a39c229b Fix typo 2018-07-10 17:29:02 +08:00
heinrich5991 925aff21d4 Fix all the header guards and adjust the script a little 2018-07-06 16:11:38 +02:00
ZombieToad 712fca8adc fixes
thnx to Hey, Fuck you!
2018-07-04 04:35:06 +01:00
def 5e1f62fe7c Fix http map download... 2018-06-30 09:47:45 +02:00
Dennis Felsing 35a26290db Mac OSX: Don't use desktop resolution (fixes #1174) 2018-06-27 11:01:59 +02:00
heinrich5991 ab55bcd9c8 Also search for maps with sha256 in downloadedmaps
Additionally, forget the extra map details after disconnecting, they
shouldn't be used for the next server.
2018-06-24 17:04:50 +02:00
heinrich5991 ca8fcc823c Use more secure hash function for map downloads
SHA256 was chosen because it is reasonably standard, the file names
don't explode in length (this rules out SHA512) and it is supported by
basically all versions of OpenSSL (this rules out SHA512/256 and SHA3).

The protocol is changed in a backward compatible way: The supporting
server sends the SHA256 corresponding to the map in the `MAP_DETAILS`
message prior to sending the `MAP_CHANGE` message. The client saves the
SHA256 obtained from the `MAP_DETAILS` message until the next
`MAP_CHANGE` message.

For servers not supporting this protocol, the client falls back to
simply opening maps like in the previous scheme.

Remove the `map_version` tool, it is not being used and would have been
a little bit effort to update.

Use the OpenSSL implementation of SHA256 if it is supported, otherwise
fall back to a public domain one.

Fix #1127.
2018-06-24 17:04:50 +02:00
bors[bot] ebb9481857 Merge #1157 #1160
1157: Add a way to call for external moderator help r=Learath2 a=heinrich5991

This is done by HTTP POSTing to a location specified by
`sv_modhelp_url`. We also provide a `src/modhelp/server.py` which can
use theses POSTs to forward them to Discord servers.

The POST contains a JSON object payload, with the keys `"port"` which
contains the server port, `"player_id"` which contains the calling
player's client ID, `"player_name"` which contains the calling player's
nick and `"message"` which is the user-specified message.

Make JSON-escaping function public, add tests and fix bugs uncovered by
these tests.

Supersedes #1129.

1160: Fix warning about incompatible function pointers r=Learath2 a=heinrich5991

This comes at the cost of one allocation per started thread. This should
be okay because we're about to invoke a syscall anyway.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2018-06-24 14:12:48 +00:00
bors[bot] af1f9d198a Merge #1152
1152: send password to first connected server r=heinrich5991 a=ZombieToad

https://github.com/ddnet/ddnet/pull/1149#issuecomment-397538132

fixes issues with connecting to servers with reserved slots

Co-authored-by: ZombieToad <25847476+zombietoad@users.noreply.github.com>
2018-06-20 09:05:56 +00:00
ZombieToad f6d107b264
Update client.cpp 2018-06-20 07:44:44 +01:00
ZombieToad dfaa8d1f46
Update client.cpp 2018-06-20 07:43:55 +01:00
ZombieToad 1c88ffd663
Update client.h 2018-06-20 07:36:10 +01:00
heinrich5991 36694d3852 Add a way to call for external moderator help
This is done by HTTP POSTing to a location specified by
`sv_modhelp_url`. We also provide a `src/modhelp/server.py` which can
use theses POSTs to forward them to Discord servers.

The POST contains a JSON object payload, with the keys `"port"` which
contains the server port, `"player_id"` which contains the calling
player's client ID, `"player_name"` which contains the calling player's
nick and `"message"` which is the user-specified message.

Make JSON-escaping function public, add tests and fix bugs uncovered by
these tests.

Supersedes #1129.
2018-06-19 23:27:35 +02:00
heinrich5991 c739aef60e Some style fixes 2018-06-19 14:28:53 +02:00
ZombieToad 57d1c37fb4
send password to first connected server 2018-06-16 00:44:24 +01:00
ZombieToad 45a9d96a76
send password to first connected server 2018-06-16 00:41:55 +01:00
ZombieToad e05bd9c6c8
remove unused thingy 2018-06-14 20:44:14 +01:00
Dennis Felsing ae3d91cf17 Set cl_refresh_rate to 0 by default to get higher fps and faster input processing 2018-05-28 08:03:31 +02:00
bors[bot] eca23e45b7 Merge #1128
1128: Remove superfluous parameter from `CServer::NewClientNoAuthCallback` r=Learath2 a=heinrich5991

The `Reset` parameter was only ever set to true, at the only call site.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2018-05-12 15:47:29 +00:00
def a7b778977a Add sv_sql_validservernames (fixes #1123) 2018-05-11 21:57:47 +02:00
heinrich5991 9454dfbff9 Remove superfluous parameter from CServer::NewClientNoAuthCallback
The `Reset` parameter was only ever set to true, at the only call site.
2018-05-09 23:50:25 +02:00
jupeyy 88acd47c99 reset font texture at window resize 2018-05-07 06:02:44 +02:00