summaryrefslogtreecommitdiffstats
path: root/serial
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-10 21:54:12 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-10 21:54:12 +0100
commit321b4afa541196cab0ce22ec9c0f00a467a71d6f (patch)
tree1f7030a2a3b6abb727ff80c4ea9d07cc3a04ba62 /serial
parent972fc8cc7181e503f90dcfae53d35602a562afa2 (diff)
Convert two more users to g_timeout_add_seconds()
Diffstat (limited to 'serial')
-rw-r--r--serial/port.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/serial/port.c b/serial/port.c
index 9b58f212..51250aa5 100644
--- a/serial/port.c
+++ b/serial/port.c
@@ -249,8 +249,9 @@ static void open_notify(int fd, int err, struct serial_port *port)
g_dbus_send_message(device->conn, reply);
}
-static gboolean open_continue(struct serial_port *port)
+static gboolean open_continue(gpointer user_data)
{
+ struct serial_port *port = user_data;
int fd;
static int ntries = MAX_OPEN_TRIES;
@@ -282,7 +283,7 @@ static int port_open(struct serial_port *port)
fd = open(port->dev, O_RDONLY | O_NOCTTY);
if (fd < 0) {
- g_timeout_add(OPEN_WAIT, (GSourceFunc) open_continue, port);
+ g_timeout_add_seconds(OPEN_WAIT, open_continue, port);
return -EINPROGRESS;
}