A simple poll implementation built on top of GLib, pollGtk can only be
inited once in a program's lifetime. This works for product but not
testcases.
This patch changes the function static variable "inited" to be file static,
and can be reset this variable in PollGtkExit().
} Poll;
static Poll *pollState;
-
+static volatile gsize inited = 0;
static VMwareStatus
PollGtkCallback(PollClassSet classSet, // IN
g_free(poll);
pollState = NULL;
+ inited = 0;
}
void
Poll_InitGtk(void)
{
- static volatile gsize inited = 0;
-
static const PollImpl gtkImpl =
{
PollGtkInit,