mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-19 06:43:27 +00:00
Remove g_smartcard_channel global
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
555886c8d7
commit
542bc47846
@ -467,7 +467,7 @@ void reds_unregister_channel(RedsState *reds, RedChannel *channel)
|
||||
}
|
||||
}
|
||||
|
||||
static RedChannel *reds_find_channel(RedsState *reds, uint32_t type, uint32_t id)
|
||||
RedChannel *reds_find_channel(RedsState *reds, uint32_t type, uint32_t id)
|
||||
{
|
||||
GListIter it;
|
||||
RedChannel *channel;
|
||||
|
||||
@ -47,6 +47,7 @@ void reds_enable_mm_time(RedsState *reds);
|
||||
uint32_t reds_get_mm_time(void);
|
||||
void reds_register_channel(RedsState *reds, RedChannel *channel);
|
||||
void reds_unregister_channel(RedsState *reds, RedChannel *channel);
|
||||
RedChannel *reds_find_channel(RedsState *reds, uint32_t type, uint32_t id);
|
||||
int reds_get_mouse_mode(RedsState *reds); // used by inputs_channel
|
||||
gboolean reds_config_get_agent_mouse(const RedsState *reds); // used by inputs_channel
|
||||
int reds_has_vdagent(RedsState *reds); // used by inputs channel
|
||||
|
||||
@ -602,14 +602,11 @@ red_smartcard_channel_class_init(RedSmartcardChannelClass *klass)
|
||||
|
||||
}
|
||||
|
||||
/* FIXME: remove global */
|
||||
RedSmartcardChannel *g_smartcard_channel;
|
||||
|
||||
static void smartcard_init(RedsState *reds)
|
||||
{
|
||||
spice_assert(!g_smartcard_channel);
|
||||
spice_assert(!reds_find_channel(reds, SPICE_CHANNEL_SMARTCARD, 0));
|
||||
|
||||
g_smartcard_channel = red_smartcard_channel_new(reds);
|
||||
red_smartcard_channel_new(reds);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user