VNC: Rename client's 'username' key

It's the SASL username, so it's better to call it 'sasl_username'
to be consistent.

Note that this change wouldn't be allowed if QMP were stable.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Luiz Capitulino 2010-01-14 14:50:54 -02:00 committed by Anthony Liguori
parent a77893829c
commit 7682506723

9
vnc.c
View file

@ -228,7 +228,8 @@ static QDict *do_info_vnc_client(Monitor *mon, VncState *client)
#ifdef CONFIG_VNC_SASL #ifdef CONFIG_VNC_SASL
if (client->sasl.conn && if (client->sasl.conn &&
client->sasl.username) { client->sasl.username) {
qdict_put(qdict, "username", qstring_from_str(client->sasl.username)); qdict_put(qdict, "sasl_username",
qstring_from_str(client->sasl.username));
} }
#endif #endif
@ -253,8 +254,8 @@ static void info_vnc_iter(QObject *obj, void *opaque)
#endif #endif
#ifdef CONFIG_VNC_SASL #ifdef CONFIG_VNC_SASL
monitor_printf(mon, " username: %s\n", monitor_printf(mon, " username: %s\n",
qdict_haskey(client, "username") ? qdict_haskey(client, "sasl_username") ?
qdict_get_str(client, "username") : "none"); qdict_get_str(client, "sasl_username") : "none");
#endif #endif
} }
@ -302,7 +303,7 @@ void do_info_vnc_print(Monitor *mon, const QObject *data)
* - "host": client's IP address * - "host": client's IP address
* - "service": client's port number * - "service": client's port number
* - "x509_dname": TLS dname (optional) * - "x509_dname": TLS dname (optional)
* - "username": SASL username (optional) * - "sasl_username": SASL username (optional)
* *
* Example: * Example:
* *