diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-02-26 01:46:20 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-02-26 02:31:26 +0100 |
commit | 50684ae4cdabf10228db865d0c5c4ebea8dcc747 (patch) | |
tree | 059e72de8cacefd607ff16b07cd8a187aed33fc4 /src/common.c | |
parent | de235d84bb5005cd936dac581229964f9465b69c (diff) | |
download | gnutls-50684ae4cdabf10228db865d0c5c4ebea8dcc747.tar.gz |
rehandshake command works in udp mode as well.
Diffstat (limited to 'src/common.c')
-rw-r--r-- | src/common.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/common.c b/src/common.c index f35f16f9f7..65e9c721b7 100644 --- a/src/common.c +++ b/src/common.c @@ -1029,3 +1029,19 @@ print_list (const char *priorities, int verbose) } } +int check_command(gnutls_session_t session, const char* str) +{ +int len = strlen(str); + + if (len > 2 && str[0] == str[1] && str[0] == '*') + { + if (strncmp(str, "**REHANDSHAKE**", + sizeof ("**REHANDSHAKE**") - 1) == 0) + { + fprintf (stderr, "*** Sending rehandshake request\n"); + gnutls_rehandshake (session); + return 1; + } + } + return 0; +} |