Change-Id: I64a910b280301347bda9eb7f5a1c8de509999a06
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
/* Get file name from default engine directory */
DIR *dp = NULL;
int ret = -1;
/* Get file name from default engine directory */
DIR *dp = NULL;
int ret = -1;
struct dirent *dirp = NULL;
dp = opendir(STT_DEFAULT_ENGINE);
if (NULL != dp) {
do {
struct dirent *dirp = NULL;
dp = opendir(STT_DEFAULT_ENGINE);
if (NULL != dp) {
do {
- ret = readdir_r(dp, &entry, &dirp);
- if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTFC, "[File ERROR] Fail to read directory");
- break;
- }
if (NULL != dirp) {
if (!strcmp(".", dirp->d_name) || !strcmp("..", dirp->d_name))
if (NULL != dirp) {
if (!strcmp(".", dirp->d_name) || !strcmp("..", dirp->d_name))
static void __get_engine_list(const char* directory)
{
DIR *dp = NULL;
static void __get_engine_list(const char* directory)
{
DIR *dp = NULL;
- int ret = -1;
- struct dirent entry;
struct dirent *dirp = NULL;
if (NULL == directory) {
struct dirent *dirp = NULL;
if (NULL == directory) {
dp = opendir(directory);
if (NULL != dp) {
do {
dp = opendir(directory);
if (NULL != dp) {
do {
- ret = readdir_r(dp, &entry, &dirp);
- if (0 != ret) {
- SLOG(LOG_ERROR, stt_tag(), "[File ERROR] Fail to read directory");
- break;
- }
if (NULL != dirp) {
if (!strcmp(".", dirp->d_name) || !strcmp("..", dirp->d_name))
if (NULL != dirp) {
if (!strcmp(".", dirp->d_name) || !strcmp("..", dirp->d_name))
languages_node = xmlNewNode(NULL, (const xmlChar*)STT_TAG_ENGINE_LANGUAGE_SET);
lang = strsep(&tmp_lang, ",");
languages_node = xmlNewNode(NULL, (const xmlChar*)STT_TAG_ENGINE_LANGUAGE_SET);
lang = strsep(&tmp_lang, ",");
LOGD("lang (%s)", lang);
lang_node = xmlNewNode(NULL, (const xmlChar*)STT_TAG_ENGINE_LANGUAGE);
xmlNodeSetContent(lang_node, (const xmlChar*)lang);
LOGD("lang (%s)", lang);
lang_node = xmlNewNode(NULL, (const xmlChar*)STT_TAG_ENGINE_LANGUAGE);
xmlNodeSetContent(lang_node, (const xmlChar*)lang);
uid_t uid = 0;
int ret = -1;
ret = pkgmgr_installer_info_get_target_uid(&uid);
uid_t uid = 0;
int ret = -1;
ret = pkgmgr_installer_info_get_target_uid(&uid);
LOGE("[ERROR] Fail to get target uid");
return 0;
} else {
LOGE("[ERROR] Fail to get target uid");
return 0;
} else {
static void __read_proc()
{
DIR *dp = NULL;
static void __read_proc()
{
DIR *dp = NULL;
struct dirent *dirp = NULL;
struct dirent *dirp = NULL;
int tmp;
GList *iter = NULL;
int tmp;
GList *iter = NULL;
SLOG(LOG_ERROR, TAG_STTD, "[ERROR] Fail to open proc");
} else {
do {
SLOG(LOG_ERROR, TAG_STTD, "[ERROR] Fail to open proc");
} else {
do {
- ret = readdir_r(dp, &entry, &dirp);
- if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTD, "[ERROR] Fail to readdir");
- break;
- }
if (NULL != dirp) {
tmp = atoi(dirp->d_name);
if (NULL != dirp) {
tmp = atoi(dirp->d_name);