If lookup of the patch location failed, don't turn on responding to A2S_Rules queries. Otherwise we'll see the log getting spammed with too large packet sizes again. #1447
* Add PostgreSQL DBI extension
Bug #3849
This adds a postgresql database driver called "pgsql".
The ambuild script changes could be very wrong ;)
* Add pgsql support to clientprefs
This was originally made by Lyfe in bug 3849! Thanks for that.
PostgreSQL supports the 'IF NOT EXISTS' clause when creating tables
since version 9.1, so i've switched to use that.
* Added pgsql support to sql-admin-manager
* Add --pgsql-path to ambuild configure
* More ambuild fixes
* Compile libpq with ambuild
* Try to generate postgres configs
* Add dummy config file
* More ambuild fixes
* Get errorcode and readable error in preparequery
No need to stop getting the errorCode, if the error string should be
retrieved. Just return both!
* Fix indentation in AMBuilderPGSQL
* Try to patch and configure postgres through ambuild
* Revert "Try to patch and configure postgres through ambuild"
This reverts commit 68dfc82b8eb0ce11f621af67ec247b5f47e4a189.
* Update to use PostgreSQL 9.4
* Move postgres preparation into seperate script
Fetching, preparing and configuring of the postgresql sourcecode
is done in a seperate prepare_postgresql.sh script now.
People can use this script for their manual builds,
if they don't want to use checkout-deps.sh.
* Add patch to configure.in again
Remove the version check for autoconf in postgres 9.4 too.
* Nit: Support older objdirs for hasPgSql ambuild option
* Update to use PostgreSQL 9.4.6
* Use newer AMTL and PGSQL 9.6
* Fix threaded queries
When running the thread part of a query, it already gets the atomic
lock. Don't try to get it twice in that case.
Use a seperate lock to protect access to the lastInsertID and
lastAffectedRows variables.
* Fix SetCharacterSet racing with threaded queries
Same fix like in the mysql driver.
* Use ke::AutoLock for lastInsertID mutex
* Fix fetching one more row than available
Don't try to access a row that doesn't exist when iterating rows.
* Improve sanity checks on column access
Don't call libpq functions with out of bounds column indices.
* Let QuoteString return false if quoting failed
* Fix build for x64 support changes and update to PGSQL 9.6.9
* Fix linux build
* Fix building of connection options string
snprintf doesn't support overlapping buffers.
* Update to PostgreSQL 9.6.15
* Fix crash after freeing first IQuery object
* Fix code crunch
* Fix memory leak, cleanup
* Nuke MSVC project and Makefile
* Remove unsupported numeric error codes
* Use STL threads
* Add prebuilt libpq for Linux and Windows
* Restore and fix version.rc file
* Add PostgreSQL build instructions
* Add prebuilt libpq for Mac
* Add win64 libpq build
This is version 9.6.15 since that's what I still had laying around.
* Fix buildscript
* Fix x64 build on linux and mac
Co-authored-by: Erik Minekus <tsunami@tsunami-productions.nl>
* Add A2S_Rules fix for CS:GO to CStrike extension.
* Dont force set the cvar. Add checks before patching.
* Remove incorrect and useless check.
* Remove checking value as it is in the signature.
* Update build script changes to AMBuild 2.1 API to fix build.
* Fix bad check and ConVarRef being resolved too early.
* Whoops. This line is kinda important. Got nuked when refactoring.
* Remove unused variable.
* Updatet gamedata.
* Switch to "Addresses" gamedata lookup
* Add linux64 gamedata
* Fix mac build
Co-authored-by: Ruben Gonzalez <drifter01620@gmail.com>
Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
This is a pretty big diff because SourceMod had lots of multi-arch
workarounds that can now go away. I've also changed 'x64' to 'x86_64' in
many places since this is how AMBuild normalizes it, and it's far too
late to pick the shorter string, so we might as well suck it up.
The --target-archs parameter has been replaced with --targets. It works
the same way.
The default behavior for SDK inclusion is now "present" instead of
"all" since this lowers the burden of storing many SDKs. Official builds
will still be made with --sdks=all.
* Update basevotes
When a player leaves during a voteban, he will be banned anyway. Also added a cvar with a ban time setting.
* Update basevotes.sp
* Added VoiceHook functions
* Update extension.h
* Update extension.h
* Code optimization
* Added support for more engines
* Invalidate timers
* Fixes
* Update extension.cpp
* Update voice.cpp
* correct Forward event type to ET_Ignore.
* sdktools_voice: de-implement IsClientSpeaking
* sdktools_voice: Add notice/unbind IsClientSpeaking
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* Attempt to correct SDKHooks_TakeDamage
* Define function on both csgo and non-csgo
* Remove unneeded macros
* Fix velocity copy on CTakeDamageInfoHack init
* Add basic Insurgency support on Windows x64
This allows SourceMod to load on x64 Insurgency. There are still a lot of variable truncation warnings that have to be dealt with.
* Fix 32bit builds
* Compile MySQL extension as well
The hack for __iob_func being removed from the core runtime, but required by the old mysql we're building against can be simplified a lot due to the `_ReturnAddress` intrinsic available since MSVC 2015.
* Don't include the offset we want to extract in the signature
https://crash.limetech.org/stats/dbi.mysql.ext.%25/my_real_readhttps://crash.limetech.org/stats/dbi.mysql.ext.%25/net_real_write
Both of these are caused by the VIO ptr ending up as null in the middle of reading/writing to a connection - I can't find any indication of a fix for this made to MySQL, so don't think it is a bug fix we're missing, but there are some musings around the internet that it could be caused by improper thread-safety initialisation.
`my_init` (what we had here) is called internally by `mysql_library_init` but I think would have still led to an automatic `mysql_library_init` call the first time `mysql_init` was called (which we can do on a thread in case of threaded connections), which is exactly the thread-safety issue called out by the MySQL docs, so hopefully doing things properly here will help.
PR #705 made some changes for 64-bit support that required callers to
provide a buffer for object storage, but only added the required code to
the non-virtual call builder, not the virtual call builder.
Copy it over to CreateValveVCall so that ValveParamToBinParam stops
writing to a null pointer.
Fixes#1059 (Hopefully.)
The cause of the infamous "Index error writing string table baseline"
error appears to be a timing issue between the engine's network message
processing, the stringtable encoding, and command processing when adding
stringtable entries in OnConfigsExecuted.
When the first client connects the map is re-loaded which causes a full
refresh, the game's stringtable entries are added at tick 65, the client
connection is registered at tick 66, and stringtable entries added in
OnConfigsExecuted are registered as being added in tick 67. The engine
later calls WriteBaselines with the client's signon tick, and neglects
to encode the SM added entries as it considers them from the future.
To avoid this, always pass INT_MAX as the current tick when encoding
the baseline, so all stringtable entries are included regardless of when
they were added. Tested on both Windows and Linux.
* PassType typo fixup
Just some little observations, I will look up for more in other files whenever I can
* Update natives.cpp
* Update outputnatives.cpp
* Switch CS:GO Clantag set/get to use netprops + offset over sig+offset.
* Make sure the new functions are defined before using them...
* Fix offset name
* Fix incorrectly dereferencing.
`SDKCall` has existing semantics that a `-1` retval indicates null, so use that and writes an empty string to the buffer.
Consumers can tell the difference between `""` and `NULL` by checking if the return value is `0` or `-1`.
* More TR natives
* Fix small typo
* Fix another typo
* Fix TR_AllSolid description
* Change Disp to Displacement
* Reorder params in TR_GetSurfaceName
* Fix TR_GetSurfaceName
* Another fix for TR_GetSurfaceName -_-
* Change if block to switch
* Make handle first param in TR_GetSurfaceName
* Reorder TR_GetStartPosition params
* Make TranslatePartitionFlags static
* Change tabs used for formatting to spaces
* Change inline comment style to be consistent with rest of file
This simplifies non-sdk build scripts by removing their loops over SM.archs. Instead the top-level
build script will re-evaluate them for each architecture.
* Make mac/win lookups lowercase'd
* Revert #709 & 81042cc
* Adjust HashPolicy implementation across sourcemod
Basically, in order to implement our own (actual) hash policy in
`PluginSys.h`, we needed to remove the blanket implementation of `hash`
that was used before. Now, each policy must implement `hash` along with
`matches` in order to be used with `NameHashSet`. While this does force
us to change every implementation of policies across the entirety of
sourcemod, it allows core to use flexible implementations of `hash`.
* Remove logic duplication
* Improve lowercase checks
* Create DatabaseConfBuilder & remove locking
* Remove all refcounting
This is part 1/n in regards to this PR's rework
* Move db conf lookup out of RunThreadPart
* Return default configuration for failed lookups
* RefPtr members & stop leaks
* fix uint comparison warning
Prepared statements can return multiple result sets since MySQL 5.5. That can happen when calling stored procedures using `CALL x();`.
This change removes the previous caching of result bindings, since the number of fields in a result can differ from result set to result set. This could potentially have a negative impact on prepared statements always only returning one result set, since the result binding buffers are recreated everytime the statement is executed instead of once. That difference should be negligible.
Fixes#823.
MySQL defines its own timespec_t. Official mysql builds are built using VS2013, so you still need to compile the client library yourself to be able to link it, but this change makes the dbi extension compatible with future versions already.