summaryrefslogtreecommitdiffstats
path: root/gatchat/gatmux.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-10-06 18:14:11 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-10-08 12:53:25 -0500
commit273c8b06a0c25ba52ae2968eb734214015f0765e (patch)
treed493ea8288efb34a23dc4ad18aabd6eff02447db /gatchat/gatmux.c
parentbc8031e2d7c87f7267f917994f38a3eb4721c4ab (diff)
downloadofono-273c8b06a0c25ba52ae2968eb734214015f0765e.tar.bz2
Get rid of from_tty variant, use gattty instead
Diffstat (limited to 'gatchat/gatmux.c')
-rw-r--r--gatchat/gatmux.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/gatchat/gatmux.c b/gatchat/gatmux.c
index b46675b7..4390b336 100644
--- a/gatchat/gatmux.c
+++ b/gatchat/gatmux.c
@@ -188,48 +188,6 @@ GAtMux *g_at_mux_new(GIOChannel *channel)
return mux;
}
-static int open_device(const char *device)
-{
- struct termios ti;
- int fd;
-
- fd = open(device, O_RDWR | O_NOCTTY);
- if (fd < 0)
- return -1;
-
- tcflush(fd, TCIOFLUSH);
-
- /* Switch TTY to raw mode */
- memset(&ti, 0, sizeof(ti));
- cfmakeraw(&ti);
-
- tcsetattr(fd, TCSANOW, &ti);
-
- return fd;
-}
-
-GAtMux *g_at_mux_new_from_tty(const char *device)
-{
- GAtMux *mux;
- GIOChannel *channel;
- int fd;
-
- fd = open_device(device);
- if (fd < 0)
- return NULL;
-
- channel = g_io_channel_unix_new(fd);
- mux = g_at_mux_new(channel);
- g_io_channel_unref(channel);
-
- if (!mux) {
- close(fd);
- return NULL;
- }
-
- return mux;
-}
-
GAtMux *g_at_mux_ref(GAtMux *mux)
{
if (mux == NULL)