mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 06:32:44 +00:00
red-stream-device: Constify stream_device_get_device_display_info result
There should be no reason for the caller to modify the internal structure. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
dcc8e1d565
commit
59f0efb5de
@ -807,7 +807,7 @@ stream_device_init(StreamDevice *dev)
|
||||
dev->msg_len = sizeof(*dev->msg);
|
||||
}
|
||||
|
||||
StreamDeviceDisplayInfo *stream_device_get_device_display_info(StreamDevice *dev)
|
||||
const StreamDeviceDisplayInfo *stream_device_get_device_display_info(StreamDevice *dev)
|
||||
{
|
||||
return &dev->device_display_info;
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ StreamDevice *stream_device_connect(RedsState *reds, SpiceCharDeviceInstance *si
|
||||
*/
|
||||
void stream_device_create_channel(StreamDevice *dev);
|
||||
|
||||
StreamDeviceDisplayInfo *stream_device_get_device_display_info(StreamDevice *dev);
|
||||
const StreamDeviceDisplayInfo *stream_device_get_device_display_info(StreamDevice *dev);
|
||||
|
||||
/**
|
||||
* Returns -1 if the StreamDevice doesn't have a channel yet.
|
||||
|
||||
@ -978,7 +978,7 @@ void reds_send_device_display_info(RedsState *reds)
|
||||
GLIST_FOREACH(reds->char_devices, RedCharDevice, dev) {
|
||||
if (IS_STREAM_DEVICE(dev)) {
|
||||
StreamDevice *stream_dev = STREAM_DEVICE(dev);
|
||||
StreamDeviceDisplayInfo *info = stream_device_get_device_display_info(stream_dev);
|
||||
const StreamDeviceDisplayInfo *info = stream_device_get_device_display_info(stream_dev);
|
||||
size_t device_address_len = strlen(info->device_address);
|
||||
|
||||
if (device_address_len == 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user