diff options
author | Sung-jae Park <nicesj.park@samsung.com> | 2014-11-23 16:36:10 +0900 |
---|---|---|
committer | Sung-jae Park <nicesj.park@samsung.com> | 2014-11-23 16:38:41 +0900 |
commit | 7fba50f7801739c3b566acc244144f045a095e69 (patch) | |
tree | 6dc6683c0cc43b5bfe0cbb2c87d5740920baac4e | |
parent | 938cdcd37d833864a7c180bf36084a711652044d (diff) | |
download | com-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.h | 2 | ||||
-rw-r--r-- | src/com-core.c | 6 | ||||
-rw-r--r-- | src/packet.c | 2 |
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; |