You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following changes (as well as changes in shared-util) enable uAMQP server mode when the client is AMQPlite.net.
1. When detecting an invalid header (e.g. due to protocol id 3 being sent as in the case of SASL, per spec the server must reply with its desired header then close the connection. Registering a sent complete callback and then invoke the error handler to clean up.
2. connection_listen opens the underlying IO. Since header detect io is already opened by the endpoint callback, the callbacks are not properly registered causing a prefetch on null later.
3. A link attach request needs to have a link attach response. This was not sent since the link was initialized already to be in HALF_ATTACH state. Remove initial Set and have the session state change callback take care of the attach.
4. Attach properties was not initialized, causing a crash on send attach later.
5. Flow sends incoming id, even though incoming id was not yet initialized in a flow message from client. This is not per spec, as the id is not initialized and thus random, thus client closes the connection. Ensure that incoming id is not added to the flow message on first send.
6. Likewise, on first received flow frame, per spec the window is calculated from the initial outgoing-id of the endpoint (in our case 0).
7. Adding the wsio_open changes required due to xio_open signature change. Fixing sasl_io to honor the close callback.
All changes were tested using the local server and client samples as well as the amqpnodeserver for fgw. These changes depend on latest develop branch state in amqp-shared-c, so this change also forwards the commit id of the shared submodule.
@@ -390,7 +392,7 @@ static int on_ws_callback(struct lws *wsi, enum lws_callback_reasons reason, voi
390
392
/* Codes_SRS_WSIO_01_084: [The bytes argument shall point to the received bytes as indicated by the LWS_CALLBACK_CLIENT_RECEIVE in argument.] */
391
393
/* Codes_SRS_WSIO_01_085: [The length argument shall be set to the number of received bytes as indicated by the LWS_CALLBACK_CLIENT_RECEIVE len argument.] */
392
394
/* Codes_SRS_WSIO_01_086: [The callback_context shall be set to the callback_context that was passed in wsio_open.] */
393
-
wsio_instance->on_bytes_received(wsio_instance->open_callback_context, in, len);
395
+
wsio_instance->on_bytes_received(wsio_instance->on_bytes_received_context, in, len);
@@ -844,7 +850,7 @@ int wsio_close(CONCRETE_IO_HANDLE ws_io, ON_IO_CLOSE_COMPLETE on_io_close_comple
844
850
{
845
851
/* Codes_SRS_WSIO_01_047: [The callback on_io_close_complete shall be called after the close action has been completed in the context of wsio_close (wsio_close is effectively blocking).] */
846
852
/* Codes_SRS_WSIO_01_048: [The callback_context argument shall be passed to on_io_close_complete as is.] */
0 commit comments