#define player_send_msg_with_fd(fd, tfd, msg) \
do { \
int __len__ = 0; \
- if ((fd != MM_ERROR_INVALID_ARGUMENT) && muse_core_fd_is_valid(fd)) { \
+ if ((fd > 0) && muse_core_fd_is_valid(fd)) { \
__len__ = muse_core_msg_send_fd(fd, tfd, msg); \
if (__len__ <= 0) \
LOGE("sending message failed"); \
MUSE_TYPE_##type2, #param2, __value2__, \
0); \
__fd__ = muse_server_module_get_msg_fd(module); \
- if (__fd__ != MM_ERROR_INVALID_ARGUMENT) { \
+ if (__fd__ > 0) { \
if (muse_core_msg_send_fd(__fd__, __tfd__, __sndMsg__) <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
client_fd = muse_server_module_get_msg_fd(module);
+ if ((client_fd < 0) || !muse_core_fd_is_valid(client_fd)) {
+ LOGE("get msg fd failed : %d", client_fd);
+ return PLAYER_ERROR_INVALID_OPERATION;
+ }
+
for (idx = 0; idx < NUM_OF_URI_PREFIX; idx++) {
if (strncmp(path, uri_prefix[idx], strlen(uri_prefix[idx])) == 0) {
LOGD("internet privilege will be checked for %s path", uri_prefix[idx]);