m->ch[MUSE_CHANNEL_MSG].sock_fd = client_sockfd;
m->pid = pid;
} else {
- pid = _ms_get_pid(client_sockfd);
instance_queue = ms_get_instance()->connection->instance_queue;
length = g_queue_get_length(instance_queue);
for (idx = 0; idx < length; idx++) {
peeked_m = (muse_module_h)g_queue_peek_nth(instance_queue, idx);
- if (peeked_m->pid == pid && peeked_m->idx == MUSE_PLAYER) {
+ if (peeked_m->pid == pid) {
SECURE_LOGI("instance #%d - %s %p (%d)", idx, muse_server->conf->host[peeked_m->idx], peeked_m, peeked_m->pid);
m = peeked_m;
m->ch[MUSE_CHANNEL_DATA].sock_fd = client_sockfd;
}
if (m == NULL) {
- LOGW("[%d] channel %d failed to get module addr for muse_module_t", client_sockfd, channel);
+ LOGW("[%d] pid %d channel %d failed to get module addr for muse_module_t", pid, client_sockfd, channel);
goto out;
}