io: Use qio_channel_has_feature() where applicable

Parts of the code have been testing QIOChannel features directly with a
logical AND. This patch makes it all consistent by using the
qio_channel_has_feature() function to test if a feature is present.

Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Felipe Franciosi 2016-09-29 08:52:36 -07:00 committed by Daniel P. Berrange
parent 8fbf661212
commit e413ae0c04
4 changed files with 6 additions and 5 deletions

View file

@ -497,7 +497,7 @@ qio_channel_websock_new_server(QIOChannel *master)
ioc = QIO_CHANNEL(wioc);
wioc->master = master;
if (master->features & (1 << QIO_CHANNEL_FEATURE_SHUTDOWN)) {
if (qio_channel_has_feature(master, QIO_CHANNEL_FEATURE_SHUTDOWN)) {
ioc->features |= (1 << QIO_CHANNEL_FEATURE_SHUTDOWN);
}
object_ref(OBJECT(master));