From c9a37e4a9a3c798582755757af429fe998746112 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 28 Jan 2010 22:05:44 +0100 Subject: Add new constructor for fully blocking operation --- gatchat/gatutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gatchat/gatutil.c') diff --git a/gatchat/gatutil.c b/gatchat/gatutil.c index dcff4c7b..7ca1d3f9 100644 --- a/gatchat/gatutil.c +++ b/gatchat/gatutil.c @@ -106,7 +106,7 @@ void g_at_util_debug_chat(gboolean in, const char *str, gsize len, g_free(escaped_str); } -gboolean g_at_util_setup_io(GIOChannel *io) +gboolean g_at_util_setup_io(GIOChannel *io, GIOFlags flags) { GIOFlags io_flags; @@ -116,7 +116,7 @@ gboolean g_at_util_setup_io(GIOChannel *io) io_flags = g_io_channel_get_flags(io); - io_flags |= G_IO_FLAG_NONBLOCK; + io_flags |= (flags & G_IO_FLAG_SET_MASK); if (g_io_channel_set_flags(io, io_flags, NULL) != G_IO_STATUS_NORMAL) -- cgit v1.2.3