diff options
author | Sung-jae Park <nicesj.park@samsung.com> | 2013-06-27 14:06:13 +0900 |
---|---|---|
committer | Sung-jae Park <nicesj.park@samsung.com> | 2013-06-27 14:06:13 +0900 |
commit | 7a4800c7368d0749a0ee72cda345afa48be49c0a (patch) | |
tree | a882d344768705d4544907c1b3d07b6081fadd4d /src | |
parent | 04e988f25ee3ab65e7c63c5eb6875ef174bb5b82 (diff) | |
download | com-core-7a4800c7368d0749a0ee72cda345afa48be49c0a.tar.gz com-core-7a4800c7368d0749a0ee72cda345afa48be49c0a.tar.bz2 com-core-7a4800c7368d0749a0ee72cda345afa48be49c0a.zip |
Update Log Tag
Change-Id: Ic830d5000575d9cd14012589e040ecf2248d70d8
Diffstat (limited to 'src')
-rw-r--r-- | src/com-core.c | 8 | ||||
-rw-r--r-- | src/com-core_packet.c | 5 | ||||
-rw-r--r-- | src/com-core_thread.c | 10 |
3 files changed, 6 insertions, 17 deletions
diff --git a/src/com-core.c b/src/com-core.c index 7aa172e..1fb3c48 100644 --- a/src/com-core.c +++ b/src/com-core.c @@ -134,19 +134,18 @@ static gboolean accept_cb(GIOChannel *src, GIOCondition cond, gpointer cbdata) } if ((cond & G_IO_ERR) || (cond & G_IO_HUP) || (cond & G_IO_NVAL)) { - DbgPrint("Client connection is lost\n"); + ErrPrint("Client connection is lost\n"); secure_socket_destroy_handle(socket_fd); free(cbdata); return FALSE; } - DbgPrint("New connectino arrived: socket(%d)\n", socket_fd); client_fd = secure_socket_get_connection_handle(socket_fd); if (client_fd < 0) { free(cbdata); return FALSE; } - DbgPrint("New client: %d\n", client_fd); + DbgPrint("New connectino arrived: server(%d), client(%d)\n", socket_fd, client_fd); if (fcntl(client_fd, F_SETFD, FD_CLOEXEC) < 0) ErrPrint("Error: %s\n", strerror(errno)); @@ -182,7 +181,6 @@ static gboolean accept_cb(GIOChannel *src, GIOCondition cond, gpointer cbdata) g_io_channel_unref(gio); invoke_con_cb_list(client_fd); - DbgPrint("New client is connected with %d\n", client_fd); return TRUE; } @@ -214,7 +212,7 @@ EAPI int com_core_server_create(const char *addr, int is_sync, int (*service_cb) if (!is_sync && fcntl(fd, F_SETFL, O_NONBLOCK) < 0) ErrPrint("fcntl: %s\n", strerror(errno)); - DbgPrint("Create new IO channel for socket FD: %d\n", fd); + DbgPrint("Create new IO channel for server FD: %d\n", fd); gio = g_io_channel_unix_new(fd); if (!gio) { ErrPrint("Failed to create new io channel\n"); diff --git a/src/com-core_packet.c b/src/com-core_packet.c index d6189df..4869cc9 100644 --- a/src/com-core_packet.c +++ b/src/com-core_packet.c @@ -471,8 +471,6 @@ EAPI struct packet *com_core_packet_oneshot_send(const char *addr, struct packet if (fd < 0) return NULL; - DbgPrint("FD: %d\n", fd); - if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) ErrPrint("fcntl: %s\n", strerror(errno)); @@ -483,8 +481,6 @@ EAPI struct packet *com_core_packet_oneshot_send(const char *addr, struct packet if (ret < 0) goto out; - DbgPrint("Sent: %d bytes (%d bytes)\n", ret, packet_size(packet)); - ptr = malloc(packet_header_size()); if (!ptr) { ErrPrint("Heap: %s\n", strerror(errno)); @@ -509,7 +505,6 @@ EAPI struct packet *com_core_packet_oneshot_send(const char *addr, struct packet } size = packet_payload_size(result); - DbgPrint("Payload size: %d\n", size); if (size < 0) { packet_destroy(result); result = NULL; diff --git a/src/com-core_thread.c b/src/com-core_thread.c index 4f0b12b..7b5655e 100644 --- a/src/com-core_thread.c +++ b/src/com-core_thread.c @@ -437,12 +437,12 @@ static gboolean evt_pipe_cb(GIOChannel *src, GIOCondition cond, gpointer data) } if (!(cond & G_IO_IN)) { - DbgPrint("PIPE is not valid\n"); + ErrPrint("PIPE is not valid\n"); goto errout; } if ((cond & G_IO_ERR) || (cond & G_IO_HUP) || (cond & G_IO_NVAL)) { - DbgPrint("PIPE is not valid\n"); + ErrPrint("PIPE is not valid\n"); goto errout; } @@ -512,7 +512,7 @@ static inline struct tcb *tcb_create(int client_fd, int is_sync, int (*service_c return NULL; } - DbgPrint("[%d] New TCB created: %d, %d\n", client_fd, tcb->evt_pipe[PIPE_READ], tcb->evt_pipe[PIPE_WRITE]); + DbgPrint("[%d] New TCB created: R(%d), W(%d)\n", client_fd, tcb->evt_pipe[PIPE_READ], tcb->evt_pipe[PIPE_WRITE]); return tcb; } @@ -542,7 +542,6 @@ static gboolean accept_cb(GIOChannel *src, GIOCondition cond, gpointer data) return FALSE; } - DbgPrint("New connection is made: socket(%d)\n", socket_fd); fd = secure_socket_get_connection_handle(socket_fd); if (fd < 0) { ErrPrint("Failed to get client fd from socket\n"); @@ -550,7 +549,6 @@ static gboolean accept_cb(GIOChannel *src, GIOCondition cond, gpointer data) return FALSE; } - DbgPrint("New client: %d\n", fd); if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) ErrPrint("Error: %s\n", strerror(errno)); @@ -596,7 +594,6 @@ static gboolean accept_cb(GIOChannel *src, GIOCondition cond, gpointer data) } g_io_channel_unref(gio); - DbgPrint("New client is connected with %d\n", tcb->handle); invoke_con_cb_list(tcb->handle); ret = pthread_create(&tcb->thid, NULL, client_cb, tcb); @@ -671,7 +668,6 @@ EAPI int com_core_thread_client_create(const char *addr, int is_sync, int (*serv g_io_channel_unref(gio); - DbgPrint("New client is connected with %d\n", client_fd); invoke_con_cb_list(tcb->handle); ret = pthread_create(&tcb->thid, NULL, client_cb, tcb); |