@@ -53,32 +53,42 @@ namespace ngs
53
53
ngs::shared_ptr<Session_interface> session () { return m_session; }
54
54
55
55
public: // impl ngs::Client_interface
56
- virtual void run (const bool skip_resolve_name);
56
+ void run (const bool skip_resolve_name) override ;
57
57
58
- virtual void activate_tls ();
58
+ void activate_tls () override ;
59
59
60
- virtual void reset_accept_time ();
60
+ void reset_accept_time () override ;
61
61
62
- virtual void on_auth_timeout ();
63
- virtual void on_server_shutdown ();
62
+ void on_auth_timeout () override ;
63
+ void on_server_shutdown () override ;
64
64
65
- virtual Server_interface &server () const { return m_server; }
66
- virtual Connection_vio &connection () { return *m_connection; };
65
+ Server_interface &server () const override { return m_server; }
66
+ Connection_vio &connection () override { return *m_connection; };
67
67
68
- virtual void on_session_auth_success (Session_interface &s);
69
- virtual void on_session_close (Session_interface &s);
70
- virtual void on_session_reset (Session_interface &s);
68
+ void on_session_auth_success (Session_interface &s) override ;
69
+ void on_session_close (Session_interface &s) override ;
70
+ void on_session_reset (Session_interface &s) override ;
71
71
72
- virtual void disconnect_and_trigger_close ();
72
+ void disconnect_and_trigger_close () override ;
73
73
74
- virtual const char *client_address () const { return m_client_addr.c_str (); }
75
- virtual const char *client_hostname () const { return m_client_host.c_str (); }
76
- virtual const char *client_id () const { return m_id; }
77
- virtual Client_id client_id_num () const { return m_client_id; }
78
- virtual int client_port () const { return m_client_port; }
74
+ const char *client_address () const override { return m_client_addr.c_str (); }
75
+ const char *client_hostname () const override { return m_client_host.c_str (); }
76
+ const char *client_id () const override { return m_id; }
77
+ Client_id client_id_num () const override { return m_client_id; }
78
+ int client_port () const override { return m_client_port; }
79
79
80
- virtual Client_state get_state () const { return m_state.load (); };
81
- virtual chrono::time_point get_accept_time () const ;
80
+ Client_state get_state () const override { return m_state.load (); };
81
+ chrono::time_point get_accept_time () const override ;
82
+
83
+ void set_supports_expired_passwords (bool flag)
84
+ {
85
+ m_supports_expired_passwords = flag;
86
+ }
87
+
88
+ bool supports_expired_passwords () const override
89
+ {
90
+ return m_supports_expired_passwords;
91
+ }
82
92
83
93
protected:
84
94
char m_id[2 +sizeof (Client_id)*2 +1 ]; // 64bits in hex, plus 0x plus \0
@@ -114,6 +124,7 @@ namespace ngs
114
124
115
125
char * m_msg_buffer;
116
126
size_t m_msg_buffer_size;
127
+ bool m_supports_expired_passwords;
117
128
118
129
Request *read_one_message (Error_code &ret_error);
119
130
0 commit comments