X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=plugins%2Fzigbee_wrapper%2Ftelegesis_wrapper%2Fsrc%2Ftwsocketlist.c;h=0bfa9a8e81559e00fd5dd4118576c588696840a2;hb=390866079e285d2c74918432c0d597d5da52f8a0;hp=aeee38d69aac322c091c6e0087554ce32cafc37b;hpb=17c68b2fd1e74586f85e552eeab4e32dc121f8a0;p=platform%2Fupstream%2Fiotivity.git diff --git a/plugins/zigbee_wrapper/telegesis_wrapper/src/twsocketlist.c b/plugins/zigbee_wrapper/telegesis_wrapper/src/twsocketlist.c index aeee38d..0bfa9a8 100644 --- a/plugins/zigbee_wrapper/telegesis_wrapper/src/twsocketlist.c +++ b/plugins/zigbee_wrapper/telegesis_wrapper/src/twsocketlist.c @@ -58,7 +58,7 @@ TWResultCode TWCloseTWSock(TWSock * sock); static TWSock * g_twSockList = NULL; -TWResultCode TWAddTWSock(TWSock * sock, PIPlugin * plugin, const char * fileLoc) +TWResultCode TWAddTWSock(TWSock * sock, PIPlugin_Zigbee * plugin, const char * fileLoc) { if(!sock || !plugin || !fileLoc) { @@ -80,7 +80,7 @@ TWResultCode TWAddTWSock(TWSock * sock, PIPlugin * plugin, const char * fileLoc) sock->fd = open(fileLoc, O_RDWR | O_NOCTTY | O_SYNC); if(sock->fd <= 0) { - OC_LOG_V(INFO, TAG, "Could not open port. Errno is: %d\n", errno); + OIC_LOG_V(INFO, TAG, "Could not open port. Errno is: %d\n", errno); return TW_RESULT_ERROR; } @@ -110,7 +110,7 @@ TWResultCode TWAddTWSock(TWSock * sock, PIPlugin * plugin, const char * fileLoc) return TW_RESULT_OK; } -TWSock * TWGetSock(PIPlugin * plugin) +TWSock * TWGetSock(PIPlugin_Zigbee * plugin) { if(!plugin) { @@ -137,7 +137,7 @@ TWResultCode TWCloseTWSock(TWSock * sock) int ret = close(sock->fd); if(ret != 0) { - OC_LOG_V(ERROR, TAG, "Could not close port. Errno is: %d", errno); + OIC_LOG_V(ERROR, TAG, "Could not close port. Errno is: %d", errno); return TW_RESULT_ERROR; } return TW_RESULT_OK; @@ -166,7 +166,7 @@ TWResultCode TWDeleteTWSock(TWSock * sock) int mutexRet = pthread_mutex_destroy(&(sock->mutex)); if(mutexRet != 0) { - OC_LOG_V(ERROR, TAG, "Failed to destroy mutex. Error: %d", mutexRet); + OIC_LOG_V(ERROR, TAG, "Failed to destroy mutex. Error: %d", mutexRet); return TW_RESULT_ERROR; } TWResultCode result = TWCloseTWSock(sock); @@ -192,7 +192,7 @@ TWResultCode TWDeleteAllTWSock() */ int SetTerminalInfo(int fd, int speed, int parity, int shouldBlock) { - OC_LOG(INFO, TAG, "Enter SetTerminalInfo()"); + OIC_LOG(INFO, TAG, "Enter SetTerminalInfo()"); int ret = 0; struct termios terminalInfo = { @@ -203,7 +203,7 @@ int SetTerminalInfo(int fd, int speed, int parity, int shouldBlock) ret = tcgetattr(fd, &terminalInfo); if (ret != 0) { - OC_LOG_V(ERROR, TAG, "tcgetattr() - ret=%d errno=%d", ret, errno); + OIC_LOG_V(ERROR, TAG, "tcgetattr() - ret=%d errno=%d", ret, errno); ret = -1; goto exit; } @@ -212,7 +212,7 @@ int SetTerminalInfo(int fd, int speed, int parity, int shouldBlock) ret = cfsetispeed (&terminalInfo, speed); if (ret != 0) { - OC_LOG_V(ERROR, TAG, "cfsetispeed() - ret=%d errno=%d", ret, errno); + OIC_LOG_V(ERROR, TAG, "cfsetispeed() - ret=%d errno=%d", ret, errno); ret = -1; goto exit; } @@ -221,7 +221,7 @@ int SetTerminalInfo(int fd, int speed, int parity, int shouldBlock) ret = cfsetospeed (&terminalInfo, speed); if (ret != 0) { - OC_LOG_V(ERROR, TAG, "cfsetospeed() - ret=%d errno=%d", ret, errno); + OIC_LOG_V(ERROR, TAG, "cfsetospeed() - ret=%d errno=%d", ret, errno); ret = -1; goto exit; } @@ -253,11 +253,11 @@ int SetTerminalInfo(int fd, int speed, int parity, int shouldBlock) ret = tcsetattr (fd, TCSANOW, &terminalInfo); if (ret != 0) { - OC_LOG_V(ERROR, TAG, "tcsetattr - ret=%d errno=%d", ret, errno); + OIC_LOG_V(ERROR, TAG, "tcsetattr - ret=%d errno=%d", ret, errno); ret = -1; } exit: - OC_LOG_V(INFO, TAG, "Leave SetTerminalInfo() with ret=%d", ret); + OIC_LOG_V(INFO, TAG, "Leave SetTerminalInfo() with ret=%d", ret); return ret; }