if (!thread_running && z <= 0) {
/* Make sure we don't receive more packets. */
- g_io_channel_close(channels[0]);
+ g_io_channel_shutdown(channels[0], FALSE, NULL);
/* Send last packet. */
packet.type = SR_DF_END;
if (!boolstr)
return FALSE;
- if (!g_strcasecmp(boolstr, "true") ||
- !g_strcasecmp(boolstr, "yes") ||
- !g_strcasecmp(boolstr, "on") ||
- !g_strcasecmp(boolstr, "1"))
+ if (!g_ascii_strncasecmp(boolstr, "true", 4) ||
+ !g_ascii_strncasecmp(boolstr, "yes", 3) ||
+ !g_ascii_strncasecmp(boolstr, "on", 2) ||
+ !g_ascii_strncasecmp(boolstr, "1", 1))
return TRUE;
return FALSE;