summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2014-11-23 16:36:10 +0900
committerSung-jae Park <nicesj.park@samsung.com>2014-11-23 16:38:41 +0900
commit7fba50f7801739c3b566acc244144f045a095e69 (patch)
tree6dc6683c0cc43b5bfe0cbb2c87d5740920baac4e
parent938cdcd37d833864a7c180bf36084a711652044d (diff)
downloadcom-core-7fba50f7801739c3b566acc244144f045a095e69.tar.gz
com-core-7fba50f7801739c3b566acc244144f045a095e69.tar.bz2
com-core-7fba50f7801739c3b566acc244144f045a095e69.zip
guint could not be below ZERO.
[model] Redwood,Kiran,B3(Wearable) [binary_type] AP [customer] Docomo/Orange/ATT/Open [issue#] N/A [problem] [cause] [solution] [team] HomeTF [request] [horizontal_expansion] Change-Id: I0b30520819bc0ab0f5ffb0ac10765d8102312027
-rw-r--r--include/packet.h2
-rw-r--r--src/com-core.c6
-rw-r--r--src/packet.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/include/packet.h b/include/packet.h
index 366c7e4..f2cfe49 100644
--- a/include/packet.h
+++ b/include/packet.h
@@ -377,7 +377,7 @@ extern const int const packet_size(const struct packet *packet);
*/
extern struct packet *packet_build(struct packet *packet, int offset, void *data, int size);
-extern int packet_fd(struct packet *packet);
+extern int packet_fd(const struct packet *packet);
extern int packet_set_fd(struct packet *packet, int fd);
#ifdef __cplusplus
diff --git a/src/com-core.c b/src/com-core.c
index 208b564..ceec3a7 100644
--- a/src/com-core.c
+++ b/src/com-core.c
@@ -303,7 +303,7 @@ static gboolean accept_cb(GIOChannel *src, GIOCondition cond, gpointer cbdata)
g_io_channel_set_close_on_unref(gio, FALSE);
id = g_io_add_watch(gio, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL, (GIOFunc)client_cb, cbdata);
- if (id <= 0) {
+ if (id == 0) {
GError *err = NULL;
ErrPrint("Failed to add IO watch\n");
@@ -373,7 +373,7 @@ EAPI int com_core_server_create(const char *addr, int is_sync, int (*service_cb)
g_io_channel_set_close_on_unref(gio, FALSE);
id = g_io_add_watch(gio, G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL, (GIOFunc)accept_cb, cbdata);
- if (id <= 0) {
+ if (id == 0) {
GError *err = NULL;
ErrPrint("Failed to add IO watch\n");
free(cbdata);
@@ -449,7 +449,7 @@ EAPI int com_core_client_create(const char *addr, int is_sync, int (*service_cb)
g_io_channel_set_close_on_unref(gio, FALSE);
id = g_io_add_watch(gio, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL, (GIOFunc)client_cb, cbdata);
- if (id <= 0) {
+ if (id == 0) {
GError *err = NULL;
ErrPrint("Failed to add IO watch\n");
free(cbdata);
diff --git a/src/packet.c b/src/packet.c
index cc069e7..c40f78f 100644
--- a/src/packet.c
+++ b/src/packet.c
@@ -132,7 +132,7 @@ EAPI int packet_set_fd(struct packet *packet, int fd)
return 0;
}
-EAPI int packet_fd(struct packet *packet)
+EAPI int packet_fd(const struct packet *packet)
{
if (!packet || packet->state != VALID || !packet->data) {
return -EINVAL;