Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update conn.c #2

Merged
merged 1 commit into from
Nov 11, 2023
Merged

Update conn.c #2

merged 1 commit into from
Nov 11, 2023

Conversation

biot2
Copy link
Owner

@biot2 biot2 commented Nov 11, 2023

  • Added understanding of tls_available INFO param
  • Fixed wrongfully checking secure option and returning wrong error code NATS_SECURE_CONNECTION_WANTED

- Added understanding of tls_available INFO param
- Fixed wrongfully checking secure option and returning wrong error 
code NATS_SECURE_CONNECTION_WANTED
@biot2 biot2 merged commit cf7a01e into main Nov 11, 2023
@biot2 biot2 deleted the biot2-patch-2 branch November 11, 2023 08:11
biot2 pushed a commit that referenced this pull request Nov 11, 2023
* WIP: A skeleton microservice object

* Responds to a PING

* Clarified - this is NOT a JS thing!

* Renamed the example microservice

* First implementation of the default endpoint

* Sequence calculator service - a working example of multiple endpoints.

* Added support for info, stats, natsError

* refactored with the 'micro' prefix

* fixed includes

* wip custom error handler

* simplified examples

* Fixed leaks, debugged the tests

* Groups

* "Basic" test.

* more tests from go, fixes

* Docs (sans HTML) and some PR feedback (names)

* request handler returns err instead of calling Respond(Error)

* Reworked how endpoints are stores in servbice, refcounting

* fixed copyright messages

* PR feedback: fixes in examples

* PR feedback: removed redundant include mem.h

* PR Feedback: use `size_t` and `natsSubscription_GetSubject`

* PR feedback: initialize decoded_len

* PR feedback: removed err->message silliness

* PR feedback: cast size_t to int calling natsMsg_Create

* Ref counting fixes

* PR feedback: strdup-ed strings in Info and Stats

* Fixed NULL pointer crashes in the previous commit

* PR feedback: micro_new_endpoint: check if endpoint config is NULL

* PR feedback: missing unlocks

* PR feedback: use natsBuf_AppendByte where appropriate

* PR feedback: CamelCased remaining public fields

* Added support for multiple handlers for ConnectionClosed and AsyncError callback events.

Added a nats_CallbackList internal type, use it for closed and error cases.
Removed prior code for natsConn_get/setXXXCallback.
Cleaned up access to other callbacks in conn.c (lock opts).

* added is_internal to microError to avoid freeing internal values

* PR feedback: initialize  to avoid a warning

* Removed the never-implemented schema

* PR feedback: added a missing FREE(replaced)

* PR feedback: free the replaced value in SetErrorHandler and SetClosedCB

* reversed: previous (free the replaced value...), added a test

* PR feedback: whitespace

* PR feedback: nit - added natsOptions_(un)lock

* PR feedback: hopefully fixes all windows warnings

* PR feedback: hopefully fixes all windows warnings

* PR feedback: removed previous PR, wrong branch

* restored LOCK_OPTIONS macros

* `Done` handler

* printf

* Added Test_MicroAsyncErrorHandler

* PR feedback: warnings

* Fixed AsyncErr test

* Now with a Done handler to fix the test on gcc builds

* try-1

correct fix?

wip

minimized list.txt

minimized list.txt

minimized list.txt

wip

wip more

wip more+

wip more+oops

wip more+oops+printf

* wip

* wip

* wip2

* wip3

* wip4

* wip5

* reworked wip

* reworked wip2

* reworked wip3

* reworked wip4

* reworked wip5

* reworked wip5

* reworked wip6

* reworked wip7

* reworked wip8

* reworked wip9

* reworked wip10

* reworked wip11

* reworked wip12

* reworked wip13

* reworked wip14

* reworked wip15

* wip nits

* wip more nits

* Moving global variables inside natsLib for proper cleanup on close

Signed-off-by: Ivan Kozlovic <[email protected]>

* PR feedback sans global elimination

* Restored num_services=5 in tests

* PR feedback: microError.message

* PR feedback: nats_vsnprintf

* PR feedback: nats_vsnprintf, #2

* [CHANGED] More verbose endpoint INFO (nats-io#663)

* More verbose endpoint INFO

* better clone/free for metadata

* (valgrind) free test JSON array

* PR feedback: unsed var

* Fix to run on Windows

The change that I asked to make earlier regarding nats_vsnprint
in some places was wrong, but more importantly, you can't pass
a NULL buffer on Windows in order to calculate the length of
the formatted string. Instead, I added a new macro that uses
a different function for Windows.

Signed-off-by: Ivan Kozlovic <[email protected]>

---------

Signed-off-by: Ivan Kozlovic <[email protected]>
Co-authored-by: Lev Brouk <[email protected]>
Co-authored-by: Ivan Kozlovic <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant