mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
migration: Create migrate_tls_hostname() function
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> --- Moved the type to const char * (vladimir)
This commit is contained in:
parent
2eb0308bbd
commit
1f2f366c32
3 changed files with 11 additions and 2 deletions
|
@ -596,6 +596,13 @@ const char *migrate_tls_creds(void)
|
||||||
return s->parameters.tls_creds;
|
return s->parameters.tls_creds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *migrate_tls_hostname(void)
|
||||||
|
{
|
||||||
|
MigrationState *s = migrate_get_current();
|
||||||
|
|
||||||
|
return s->parameters.tls_hostname;
|
||||||
|
}
|
||||||
|
|
||||||
uint64_t migrate_xbzrle_cache_size(void)
|
uint64_t migrate_xbzrle_cache_size(void)
|
||||||
{
|
{
|
||||||
MigrationState *s = migrate_get_current();
|
MigrationState *s = migrate_get_current();
|
||||||
|
|
|
@ -82,6 +82,7 @@ int migrate_multifd_zstd_level(void);
|
||||||
uint8_t migrate_throttle_trigger_threshold(void);
|
uint8_t migrate_throttle_trigger_threshold(void);
|
||||||
const char *migrate_tls_authz(void);
|
const char *migrate_tls_authz(void);
|
||||||
const char *migrate_tls_creds(void);
|
const char *migrate_tls_creds(void);
|
||||||
|
const char *migrate_tls_hostname(void);
|
||||||
uint64_t migrate_xbzrle_cache_size(void);
|
uint64_t migrate_xbzrle_cache_size(void);
|
||||||
|
|
||||||
/* parameters setters */
|
/* parameters setters */
|
||||||
|
|
|
@ -130,8 +130,9 @@ QIOChannelTLS *migration_tls_client_create(MigrationState *s,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->parameters.tls_hostname && *s->parameters.tls_hostname) {
|
const char *tls_hostname = migrate_tls_hostname();
|
||||||
hostname = s->parameters.tls_hostname;
|
if (tls_hostname && *tls_hostname) {
|
||||||
|
hostname = tls_hostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
return qio_channel_tls_new_client(ioc, creds, hostname, errp);
|
return qio_channel_tls_new_client(ioc, creds, hostname, errp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue