}
#endif
-int ms_write_media_server_status(void)
-{
- FILE * fp = NULL;
- const char *path = "/tmp/media-server";
- const char *status = "MEDIA_SERVER OK";
-
- if (g_file_test(path, G_FILE_TEST_IS_SYMLINK)) {
- MS_DBG_ERR("path is symbolic link. file name : %s", path);
- return MS_MEDIA_ERR_INVALID_PARAMETER;
- }
-
- fp = fopen(path, "wt");
- if (fp == NULL) {
- MS_DBG_SERR("fp is NULL. file name : %s", path);
- return MS_MEDIA_ERR_INTERNAL;
- }
-
- if (fputs(status, fp) < 0) {
- MS_DBG_ERR("fputs failed");
- MS_DBG_STRERROR();
- }
-
- fclose(fp);
-
- return MS_MEDIA_ERR_NONE;
-}
-
-
#ifndef _USE_TVPD_MODE
static void __power_off_cb(void *data)
{
malloc_trim(0);
MS_DBG_INFO("Media Server is running");
- ms_write_media_server_status();
#ifdef _USE_TVPD_MODE
if (!ms_config_set_int(MS_SERVER_STATUS, 1))
MS_DBG_ERR("Fail to change sever status");