diff options
author | Eric Blake <eblake@redhat.com> | 2019-01-17 13:36:51 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2019-01-21 15:49:52 -0600 |
commit | 10b89988d6b0f5f2aed794bed5b4e774858548f4 (patch) | |
tree | 58976d76ef9a30bfbeb4791d5e8b8fb111581dc5 /nbd/trace-events | |
parent | 2b8d0954514192133b0119942edfd7a0c146900d (diff) |
nbd/client: Split handshake into two functions
An upcoming patch will add the ability for qemu-nbd to list
the services provided by an NBD server. Share the common
code of the TLS handshake by splitting the initial exchange
into a separate function, leaving only the export handling
in the original function. Functionally, there should be no
change in behavior in this patch, although some of the code
motion may be difficult to follow due to indentation changes
(view with 'git diff -w' for a smaller changeset).
I considered an enum for the return code coordinating state
between the two functions, but in the end just settled with
ample comments.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20190117193658.16413-15-eblake@redhat.com>
Diffstat (limited to 'nbd/trace-events')
-rw-r--r-- | nbd/trace-events | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nbd/trace-events b/nbd/trace-events index b4802c1570..663d11687a 100644 --- a/nbd/trace-events +++ b/nbd/trace-events @@ -14,7 +14,7 @@ nbd_receive_starttls_new_client(void) "Setting up TLS" nbd_receive_starttls_tls_handshake(void) "Starting TLS handshake" nbd_opt_meta_request(const char *optname, const char *context, const char *export) "Requesting %s %s for export %s" nbd_opt_meta_reply(const char *optname, const char *context, uint32_t id) "Received %s mapping of %s to id %" PRIu32 -nbd_receive_negotiate(void *tlscreds, const char *hostname) "Receiving negotiation tlscreds=%p hostname=%s" +nbd_start_negotiate(void *tlscreds, const char *hostname) "Receiving negotiation tlscreds=%p hostname=%s" nbd_receive_negotiate_magic(uint64_t magic) "Magic is 0x%" PRIx64 nbd_receive_negotiate_server_flags(uint32_t globalflags) "Global flags are 0x%" PRIx32 nbd_receive_negotiate_name(const char *name) "Requesting NBD export name '%s'" |