summaryrefslogtreecommitdiffstats
path: root/modules/upnp
Commit message (Collapse)AuthorAgeFilesLines
* [UPNP] Allow disabling UPNP implementation on the WebFabio Alessandrelli2024-11-2310-488/+734
| | | | | | | | | Make UPNP classes custom instance, so they can come with empty implementation on the Web (where the would not work anyway) without breaking scripts referencing it. This results in smaller Web builds by not including the library which also results in the emscripten socket wrappers to be stipped away.
* SCons: Add unobtrusive type hints in SCons filesThaddeus Crews2024-09-251-0/+1
|
* miniupnpc: Update to 2.2.8 (new major 18)Rémi Verschelde2024-09-181-0/+4
| | | | | | Keep support for major 17 by using a version check for the changed API. Fixes #93907.
* Cleanup of raw `nullptr` checks with `Ref`A Thousand Ships2024-08-311-6/+6
| | | | Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
* docs: update UPnP gdscript snippet to latest gdscriptGoutte2024-08-221-2/+2
| | | | This commit adds usage of the new (stringless) signal API.
* Replace `find` with `contains/has` where applicableA Thousand Ships2024-05-081-4/+4
| | | | | | | * Replaces `find(...) != -1` with `contains` for `String` * Replaces `find(...) == -1` with `!contains` for `String` * Replaces `find(...) != -1` with `has` for containers * Replaces `find(...) == -1` with `!has` for containers
* miniupnpc: Disable socket timeout on Windows, matching upstreamRémi Verschelde2024-05-061-1/+2
| | | | Fixes #88471.
* Use local variable to stop memory leak.Alistair Leslie-Hughes2024-04-052-23/+10
| | | | | | | | I've change the urls variable to be a local, instead of manually allocating it all the time. This is only used locally and was causing a memory leak because FreeUPNPUrls gave the impression it free it. 1. FreeUPNPUrls doesn't free the pointer passed in, that's up to caller. 2. The second if(!urls) produced dead code as we checked the pointer just after allocation.
* Replace error checks against `size` with `is_empty`A Thousand Ships2024-02-091-1/+1
|
* [Modules] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-261-2/+2
|
* Doctool: Remove version attribute from XML headerRémi Verschelde2023-07-062-2/+2
| | | | | | We don't use that info for anything, and it generates unnecessary diffs every time we bump the minor version (and CI failures if we forget to sync some files from opt-in modules (mono, text_server_fb).
* Bump version to 4.2-devRémi Verschelde2023-07-052-2/+2
| | | | Keep on waitin'
* Style: Harmonize header includes in modulesRémi Verschelde2023-06-152-4/+4
| | | | | | | | | | | | | | | | | | | | This applies our existing style guide, and adds a new rule to that style guide for modular components such as platform ports and modules: Includes from the platform port or module ("local" includes) should be listed first in their own block using relative paths, before Godot's "core" includes which use "absolute" (project folder relative) paths, and finally thirdparty includes. Includes in `#ifdef`s come after their relevant section, i.e. the overall structure is: - Local includes * Conditional local includes - Core includes * Conditional core includes - Thirdparty includes * Conditional thirdparty includes
* Validate code tags in documentation for potential paramsYuri Sizov2023-04-261-9/+9
| | | | | | | Adds a check to make_rst to look for matches between the text inside of the [code][/code] tag and known param identifiers. Fixes most of what was revealed.
* Bump version to 4.1-devRémi Verschelde2023-03-012-2/+2
| | | | Can't stop, won't stop, they said, huh?
* One Copyright Update to rule them allRémi Verschelde2023-01-056-174/+174
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Style: Misc docs and comment style and language fixesRémi Verschelde2022-11-021-2/+2
| | | | | | | | | | - Removed empty paragraphs in XML. - Consistently use bold style for "Example:", on a new line. - Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`). - Fix invalid usage of backticks for inline code in BBCode. - Fix some American/British English spelling inconsistencies. - Other minor fixes spotted along the way, including typo fixes with codespell. - Don't specify `@GlobalScope` for `enum` and `constant`.
* Fix Thread usage in UPNP docs.TechnoPorg2022-10-241-1/+1
| | | | | The threading API has changed between Godot 3 and Godot 4. See https://github.com/godotengine/godot-proposals/issues/4691.
* Update UPnP documentationMax Hilbrunner2022-08-282-12/+21
| | | | Adds more details, especially about caveats, failure modes and pitfalls
* Merge pull request #63809 from mhilbrunner/upnp-no-delete-only-addMax Hilbrunner2022-08-271-2/+0
|\ | | | | UPNP: Don't delete previous mappings when adding new port mappings
| * UPNP: Don't delete mappings when adding mappingsMax Hilbrunner2022-08-021-2/+0
| | | | | | | | | | Don't delete previous mappings when adding a new mapping. This was a old workaround that seems to cause issues.
* | Rename the argument tag to param in XML documentationYuri Sizov2022-08-082-22/+22
|/
* Code quality: Fix header guards consistencyRémi Verschelde2022-07-252-6/+6
| | | | | Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
* Refactor module initializationreduz2022-05-042-4/+13
| | | | | | | * Changed to use the same stages as extensions. * Makes the initialization more coherent, helping solve problems due to lack of stages. * Makes it easier to port between module and extension. * removed the DRIVER initialization level (no longer needed).
* Add an XML schema for documentationHugo Locurcio2022-02-152-2/+2
| | | | | | | | This makes it easier to spot syntax errors when editing the class reference. The schema is referenced locally so validation can still work offline. Each class XML's schema conformance is also checked on GitHub Actions.
* Update copyright statements to 2022Rémi Verschelde2022-01-036-12/+12
| | | | Happy new year to the wonderful Godot community!
* Rename `remove()` to `remove_at()` when removing by indexLightning_A2021-11-231-1/+1
|
* miniupnpc: Update to version 2.2.3Rémi Verschelde2021-11-194-6/+6
| | | | | Library code and public headers are now properly separated, we can fix include paths to remove the redundant subfolder.
* clang-format: Disable alignment of operands, too unreliableRémi Verschelde2021-10-281-4/+4
| | | | | | | | | Sets `AlignOperands` to `DontAlign`. `clang-format` developers seem to mostly care about space-based indentation and every other version of clang-format breaks the bad mismatch of tabs and spaces that it seems to use for operand alignment. So it's better without, so that it respects our two-tabs `ContinuationIndentWidth`.
* Document how to set up UPnP in a non-blocking mannerHugo Locurcio2021-09-301-0/+32
|
* doc: Use self-closing tags for `return` and `argument`Rémi Verschelde2021-07-302-74/+37
| | | | | | | | For the time being we don't support writing a description for those, preferring having all details in the method's description. Using self-closing tags saves half the lines, and prevents contributors from thinking that they should write the argument or return documentation there.
* Implement the ability to disable classesreduz2021-07-131-2/+2
| | | | | | | * This PR adds the ability to disable classes when building. * For now it's only possible to do this via command like: `scons disable_classes=RayCast2D,Area3D` * Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-1/+1
|
* Rename Reference to RefCountedPedro J. Estébanez2021-06-114-8/+8
|
* miniupnpc: Update to version 2.2.2Rémi Verschelde2021-03-161-7/+8
|
* [Net] Fix miniupnpc when no interface is specifiedFabio Alessandrelli2021-03-151-2/+4
| | | | | | | | | | | | | | | | | | | | This is a tricky one, it used to work, but it was wrong, because in such a scenario instead of passing NULL as required by the API, it would pass a buffer containing the `\0` terminator. This stopped working on a specific miniupnpc version, when they fixed some network endianess issue on Windows, to which we made a workaround, which in turn would probably result in failures when the interface is specified. This commit address the issue properly, by checking the specified interface string size, and correctly passing NULL instead of the empty string when necessary. Also reverts the commit that introduced the bogus workaround: e85330231c729a88d5a478de2bbe4a61e5edeae3 One of those PR when the explaination is much longer then code changes :).
* Initialize class/struct variables with default values in modules/Rafał Mikrut2021-02-082-6/+3
|
* Update copyright statements to 2021Rémi Verschelde2021-01-016-12/+12
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Rename empty() to is_empty()Marcel Admiraal2020-12-282-3/+3
|
* SCons: Add explicit dependencies on thirdparty code in cloned envRémi Verschelde2020-12-181-2/+13
| | | | | | | | | | | | | | Since we clone the environments to build thirdparty code, we don't get an explicit dependency on the build objects produced by that environment. So when we update thirdparty code, Godot code using it is not necessarily rebuilt (I think it is for changed headers, but not for changed .c/.cpp files), which can lead to an invalid compilation output (linking old Godot .o files with a newer, potentially ABI breaking version of thirdparty code). This was only seen as really problematic with bullet updates (leading to crashes when rebuilding Godot after a bullet update without cleaning .o files), but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-162-2/+0
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-073-3/+3
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-143-3/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Improve error explanations related to UPNP and UPNPDeviceRudigus2020-04-132-15/+14
|
* Replace NULL with nullptrlupoDharkael2020-04-022-16/+16
|
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-302-4/+7
| | | | | | | | | | | | | | | | | | | | | Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
* Adding missing include guards to header files identified by LGTM.Rajat Goswami2020-03-231-0/+5
| | | | This addresses the issue godotengine/godot#37143
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-1/+1
| | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Mention the `duration` parameter unit in `UPNP.add_port_mapping()`Hugo Locurcio2020-02-271-1/+1
|
* Update docs to version 4.0clayjohn2020-01-312-2/+2
|