[Version] Release 0.9.248
[Profile] Common
[Issue Type] Bug Fix
Change-Id: I8514b6783f896381b4ef426084ba674041f1f61f
Signed-off-by: Seungbae Shin <seungbae.shin@samsung.com>
#include <mm_debug.h>
#include "include/mm_sound.h"
+#include "include/mm_sound_client.h"
#include "include/mm_sound_focus.h"
#include "focus_server/include/mm_sound_mgr_focus.h"
gboolean input (GIOChannel *channel)
{
GError *err = NULL;
- gsize read;
- char buf[MAX_STRING_LEN + 3];
+ gchar *buf = NULL;
+ gsize length = 0;
- g_io_channel_read_chars(channel, buf, MAX_STRING_LEN, &read, &err);
- buf[read] = '\0';
- g_strstrip(buf);
-
- interpret (buf);
+ if (g_io_channel_read_line(channel, &buf, &length, NULL, &err) == G_IO_STATUS_NORMAL) {
+ if (length > 1) {
+ g_strstrip(buf);
+ interpret(buf);
+ }
+ g_free(buf);
+ }
return TRUE;
}