aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/session.c2
-rw-r--r--libsylph/socket.c14
-rw-r--r--libsylph/socket.h10
3 files changed, 13 insertions, 13 deletions
diff --git a/libsylph/session.c b/libsylph/session.c
index 7f199f6e..d64fc72d 100644
--- a/libsylph/session.c
+++ b/libsylph/session.c
@@ -289,7 +289,7 @@ static gboolean session_ping_cb(gpointer data)
debug_print("state machine freeze for 1 second detected, forcing dispatch.\n");
save_flags = sock->flags;
- SOCK_UNSET_FLAGS(sock->flags, SOCK_CHECK_IO);
+ SOCK_UNSET_FLAGS(sock->flags, SYL_SOCK_CHECK_IO);
sock->callback(sock, sock->condition, sock->data);
sock->flags = save_flags;
}
diff --git a/libsylph/socket.c b/libsylph/socket.c
index 55ae3cfd..97d273d7 100644
--- a/libsylph/socket.c
+++ b/libsylph/socket.c
@@ -1,6 +1,6 @@
/*
* LibSylph -- E-Mail client library
- * Copyright (C) 1999-2007 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2008 Hiroyuki Yamamoto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -383,9 +383,9 @@ static gint set_nonblocking_mode(gint fd, gboolean nonblock)
sock = sock_find_from_fd(fd);
if (sock) {
if (nonblock) {
- SOCK_SET_FLAGS(sock->flags, SOCK_NONBLOCK);
+ SOCK_SET_FLAGS(sock->flags, SYL_SOCK_NONBLOCK);
} else {
- SOCK_UNSET_FLAGS(sock->flags, SOCK_NONBLOCK);
+ SOCK_UNSET_FLAGS(sock->flags, SYL_SOCK_NONBLOCK);
}
}
debug_print("set nonblocking mode to %d\n", nonblock);
@@ -418,9 +418,9 @@ gint sock_set_nonblocking_mode(SockInfo *sock, gboolean nonblock)
ret = set_nonblocking_mode(sock->sock, nonblock);
if (ret == 0) {
if (nonblock) {
- SOCK_SET_FLAGS(sock->flags, SOCK_NONBLOCK);
+ SOCK_SET_FLAGS(sock->flags, SYL_SOCK_NONBLOCK);
} else {
- SOCK_UNSET_FLAGS(sock->flags, SOCK_NONBLOCK);
+ SOCK_UNSET_FLAGS(sock->flags, SYL_SOCK_NONBLOCK);
}
}
@@ -882,7 +882,7 @@ SockInfo *sock_connect(const gchar *hostname, gushort port)
sockinfo->hostname = g_strdup(hostname);
sockinfo->port = port;
sockinfo->state = CONN_ESTABLISHED;
- sockinfo->flags = SOCK_CHECK_IO;
+ sockinfo->flags = SYL_SOCK_CHECK_IO;
sock_list = g_list_prepend(sock_list, sockinfo);
@@ -951,7 +951,7 @@ static gboolean sock_connect_async_cb(GIOChannel *source,
sockinfo->hostname = g_strdup(conn_data->hostname);
sockinfo->port = conn_data->port;
sockinfo->state = CONN_ESTABLISHED;
- sockinfo->flags = SOCK_NONBLOCK;
+ sockinfo->flags = SYL_SOCK_NONBLOCK;
sock_list = g_list_prepend(sock_list, sockinfo);
diff --git a/libsylph/socket.h b/libsylph/socket.h
index 0ad2010f..5bf8b98f 100644
--- a/libsylph/socket.h
+++ b/libsylph/socket.h
@@ -1,6 +1,6 @@
/*
* LibSylph -- E-Mail client library
- * Copyright (C) 1999-2007 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2008 Hiroyuki Yamamoto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -46,14 +46,14 @@ typedef enum
typedef enum
{
- SOCK_NONBLOCK = 1 << 0,
- SOCK_CHECK_IO = 1 << 1
+ SYL_SOCK_NONBLOCK = 1 << 0,
+ SYL_SOCK_CHECK_IO = 1 << 1
} SockFlags;
#define SOCK_SET_FLAGS(flags, set) { (flags) |= (set); }
#define SOCK_UNSET_FLAGS(flags, set) { (flags) &= ~(set); }
-#define SOCK_IS_NONBLOCK(flags) ((flags & SOCK_NONBLOCK) != 0)
-#define SOCK_IS_CHECK_IO(flags) ((flags & SOCK_CHECK_IO) != 0)
+#define SOCK_IS_NONBLOCK(flags) ((flags & SYL_SOCK_NONBLOCK) != 0)
+#define SOCK_IS_CHECK_IO(flags) ((flags & SYL_SOCK_CHECK_IO) != 0)
typedef gint (*SockConnectFunc) (SockInfo *sock,
gpointer data);