Skip to content

Commit

Permalink
Refactor: less indirection for send_warning/fatal_alert()
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Oct 25, 2021
1 parent e8c644e commit bf441e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions src/lib/tls/tls12/tls_channel_impl_12.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,6 @@ class Channel_Impl_12 : public Channel_Impl
*/
void send_alert(const Alert& alert) override;

/**
* Send a warning alert
*/
void send_warning_alert(Alert::Type type) override { send_alert(Alert(type, false)); }

/**
* Send a fatal alert
*/
void send_fatal_alert(Alert::Type type) override { send_alert(Alert(type, true)); }

/**
* Send a close notification alert
*/
Expand Down
4 changes: 2 additions & 2 deletions src/lib/tls/tls_channel_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ class Channel_Impl
/**
* Send a warning alert
*/
virtual void send_warning_alert(Alert::Type type) = 0;
void send_warning_alert(Alert::Type type) { send_alert(Alert(type, false)); }

/**
* Send a fatal alert
*/
virtual void send_fatal_alert(Alert::Type type) = 0;
void send_fatal_alert(Alert::Type type) { send_alert(Alert(type, true)); }

/**
* Send a close notification alert
Expand Down

0 comments on commit bf441e8

Please sign in to comment.