summaryrefslogtreecommitdiff
path: root/src/cli.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-02-21 20:42:27 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-02-21 20:42:27 +0000
commit281b955b43e5aea756d8757ddc92f4fbb68e15a6 (patch)
tree847f696feafc9623cf6ac2275a4d8140036e9267 /src/cli.c
parent9b0557dbf920e87da377907ebc850c8d14cd5730 (diff)
downloadgnutls-281b955b43e5aea756d8757ddc92f4fbb68e15a6.tar.gz
Added gnutls_alert_str (allows printing alert number descriptions)
Diffstat (limited to 'src/cli.c')
-rw-r--r--src/cli.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cli.c b/src/cli.c
index 83c5de8012..18bf464c84 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
char buffer[MAX_BUF + 1];
char *session;
char *session_id;
- int session_size;
+ int session_size, alert;
int session_id_size;
char *tmp_session_id;
int tmp_session_id_size;
@@ -269,8 +269,9 @@ int main(int argc, char **argv)
if (ret < 0) {
if (ret == GNUTLS_E_WARNING_ALERT_RECEIVED
|| ret == GNUTLS_E_FATAL_ALERT_RECEIVED)
- printf("*** Received alert [%d]\n",
- gnutls_alert_get_last(state));
+ alert = gnutls_alert_get_last( state);
+ printf("*** Received alert [%d]: %s\n",
+ alert, gnutls_alert_str( alert));
fprintf(stderr, "*** Handshake has failed\n");
gnutls_perror(ret);