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:
Frediano Ziglio 2016-10-26 10:21:46 +01:00
parent 555886c8d7
commit 542bc47846
3 changed files with 4 additions and 6 deletions

View File

@ -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;

View File

@ -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

View File

@ -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);
}