@@ -50,17 +50,27 @@ cdef class Capabilities:
5050 self .sdu = 8192 # initial value to use
5151
5252 cdef void _adjust_for_protocol(self , uint16_t protocol_version,
53- uint16_t protocol_options):
53+ uint16_t protocol_options, uint32_t flags):
54+ """
55+ Adjust the capabilities of the protocol based on the server's response
56+ to the initial connection request.
57+ """
5458 self .protocol_version = protocol_version
5559 self .supports_oob = protocol_options & TNS_GSO_CAN_RECV_ATTENTION
60+ if flags & TNS_ACCEPT_FLAG_FAST_AUTH:
61+ self .supports_fast_auth = True
62+ if protocol_version >= TNS_VERSION_MIN_END_OF_RESPONSE \
63+ and flags & TNS_ACCEPT_FLAG_HAS_END_OF_REQUEST:
64+ self .compile_caps[TNS_CCAP_TTC4] |= TNS_CCAP_END_OF_REQUEST
65+ self .supports_end_of_request = True
5666
5767 @ cython.boundscheck (False )
5868 cdef void _adjust_for_server_compile_caps(self , bytearray server_caps):
5969 if server_caps[TNS_CCAP_FIELD_VERSION] < self .ttc_field_version:
6070 self .ttc_field_version = server_caps[TNS_CCAP_FIELD_VERSION]
6171 self .compile_caps[TNS_CCAP_FIELD_VERSION] = self .ttc_field_version
6272 if self .ttc_field_version < TNS_CCAP_FIELD_VERSION_23_4 \
63- or not server_caps[TNS_CCAP_TTC4] & TNS_CCAP_END_OF_REQUEST :
73+ and self .supports_end_of_request :
6474 self .compile_caps[TNS_CCAP_TTC4] ^= TNS_CCAP_END_OF_REQUEST
6575 self .supports_end_of_request = False
6676
@@ -114,8 +124,7 @@ cdef class Capabilities:
114124 self .compile_caps[TNS_CCAP_TTC2] = TNS_CCAP_ZLNP
115125 self .compile_caps[TNS_CCAP_OCI2] = TNS_CCAP_DRCP
116126 self .compile_caps[TNS_CCAP_CLIENT_FN] = TNS_CCAP_CLIENT_FN_MAX
117- self .compile_caps[TNS_CCAP_TTC4] = TNS_CCAP_INBAND_NOTIFICATION | \
118- TNS_CCAP_END_OF_REQUEST
127+ self .compile_caps[TNS_CCAP_TTC4] = TNS_CCAP_INBAND_NOTIFICATION
119128 self .compile_caps[TNS_CCAP_TTC5] = TNS_CCAP_VECTOR_SUPPORT
120129
121130 @ cython.boundscheck (False )
0 commit comments