mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-05 03:33:14 +00:00
Check for messages with duplicate names inside a channel
Make sure there are not 2 messages with the same name in the same channel. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
abdef4fd2a
commit
e2f7a9235f
@ -1055,6 +1055,8 @@ class ChannelType(Type):
|
||||
m.value = info.count
|
||||
info.count = m.value + 1
|
||||
info.messages.append(m)
|
||||
if m.name in info.messages_byname:
|
||||
raise Exception("Duplicated message name '%s' in channel '%s'" % (m.name, self.name))
|
||||
info.messages_byname[m.name] = m
|
||||
|
||||
self.server_messages = server_info.messages
|
||||
|
||||
Loading…
Reference in New Issue
Block a user