[CLEAN] sendACKCodeToHost function remove
authorVitaliy Cherepanov <v.cherepanov@samsung.com>
Wed, 24 Jul 2013 09:27:38 +0000 (13:27 +0400)
committerVitaliy Cherepanov <v.cherepanov@samsung.com>
Wed, 24 Jul 2013 09:27:38 +0000 (13:27 +0400)
    - old string protocol function sendACKCodeToHost remove

daemon/da_protocol.c
daemon/daemon.c

index 4e17aff..329ced3 100644 (file)
@@ -1011,7 +1011,6 @@ int host_message_handler(struct msg_t *msg)
                cut_replay_events(msg);
                if (ioctl_send_msg(msg) != 0){
                        LOGE("cannot send message to device\n");
-                       sendACKCodeToHost(MSG_NOTOK, ERR_CANNOT_START_PROFILING);
                        // response to control socket
                        sendACKToHost(msg->id, ERR_CANNOT_START_PROFILING, 0, 0);
                        return -1;
index e91e5e9..4ad7520 100644 (file)
@@ -248,32 +248,6 @@ static void setEmptyTargetSlot(int index)
 }
 
 // =============================================================================
-// send functions to host
-// =============================================================================
-
-//static
-int sendACKCodeToHost(enum HostMessageType resp, int msgcode)
-{
-       // FIXME:
-       //disabled string protocol
-       return 0;
-       if (manager.host.control_socket != -1)
-       {
-               char codestr[16];
-               char logstr[DA_MSG_MAX];
-               int loglen, codelen;
-
-               codelen = sprintf(codestr, "%d", msgcode);
-               loglen = sprintf(logstr, "%d|%d|%s", (int)resp, codelen, codestr);
-
-               send(manager.host.control_socket, logstr, loglen, MSG_NOSIGNAL);
-               return 0;
-       }
-       else
-               return 1;
-}
-
-// =============================================================================
 // start and terminate control functions
 // =============================================================================
 
@@ -821,7 +795,7 @@ static int controlSocketHandler(int efd)
                msg = malloc(MSG_CMD_HDR_LEN + msg_head.len);
                if (!msg) {
                        LOGE("Cannot alloc msg\n");
-                       sendACKCodeToHost(MSG_NOTOK, ERR_WRONG_MESSAGE_FORMAT);
+                       sendACKToHost(msg_head.id, ERR_WRONG_MESSAGE_FORMAT, 0, 0);
                        return -1;
                }
                msg->id = msg_head.id;