diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-02-21 20:42:27 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-02-21 20:42:27 +0000 |
commit | 281b955b43e5aea756d8757ddc92f4fbb68e15a6 (patch) | |
tree | 847f696feafc9623cf6ac2275a4d8140036e9267 /src/cli.c | |
parent | 9b0557dbf920e87da377907ebc850c8d14cd5730 (diff) | |
download | gnutls-281b955b43e5aea756d8757ddc92f4fbb68e15a6.tar.gz |
Added gnutls_alert_str (allows printing alert number descriptions)
Diffstat (limited to 'src/cli.c')
-rw-r--r-- | src/cli.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); |