sr: don't use deprecated glib functions
As of the recent glib 2.32 release, these produce deprecation warnings at compile time.
This commit is contained in:
parent
42cdeef626
commit
993526f824
|
@ -398,7 +398,7 @@ static int receive_data(int fd, int revents, void *cb_data)
|
|||
|
||||
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;
|
||||
|
|
|
@ -306,10 +306,10 @@ SR_API gboolean sr_parse_boolstring(const char *boolstr)
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue