Stub out NLS function.
This commit is contained in:
parent
255bb2a5c4
commit
44810ab274
26
minidlna.c
26
minidlna.c
@ -464,6 +464,16 @@ static int strtobool(const char *str)
|
|||||||
(atoi(str) == 1));
|
(atoi(str) == 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void init_nls(void)
|
||||||
|
{
|
||||||
|
#ifdef ENABLE_NLS
|
||||||
|
setlocale(LC_MESSAGES, "");
|
||||||
|
setlocale(LC_CTYPE, "en_US.utf8");
|
||||||
|
DPRINTF(E_DEBUG, L_GENERAL, "Using locale dir %s\n", bindtextdomain("minidlna", getenv("TEXTDOMAINDIR")));
|
||||||
|
textdomain("minidlna");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/* init phase :
|
/* init phase :
|
||||||
* 1) read configuration file
|
* 1) read configuration file
|
||||||
* 2) read command line arguments
|
* 2) read command line arguments
|
||||||
@ -1007,12 +1017,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
for (i = 0; i < L_MAX; i++)
|
for (i = 0; i < L_MAX; i++)
|
||||||
log_level[i] = E_WARN;
|
log_level[i] = E_WARN;
|
||||||
#ifdef ENABLE_NLS
|
init_nls();
|
||||||
setlocale(LC_MESSAGES, "");
|
|
||||||
setlocale(LC_CTYPE, "en_US.utf8");
|
|
||||||
DPRINTF(E_DEBUG, L_GENERAL, "Using locale dir %s\n", bindtextdomain("minidlna", getenv("TEXTDOMAINDIR")));
|
|
||||||
textdomain("minidlna");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ret = init(argc, argv);
|
ret = init(argc, argv);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
@ -1189,11 +1194,6 @@ main(int argc, char **argv)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
|
||||||
/* for debug */
|
|
||||||
if (i > 1)
|
|
||||||
DPRINTF(E_DEBUG, L_GENERAL, "%d active incoming HTTP connections\n", i);
|
|
||||||
#endif
|
|
||||||
FD_ZERO(&writeset);
|
FD_ZERO(&writeset);
|
||||||
upnpevents_selectfds(&readset, &writeset, &max_fd);
|
upnpevents_selectfds(&readset, &writeset, &max_fd);
|
||||||
|
|
||||||
@ -1309,10 +1309,10 @@ shutdown:
|
|||||||
close(sssdp);
|
close(sssdp);
|
||||||
if (shttpl >= 0)
|
if (shttpl >= 0)
|
||||||
close(shttpl);
|
close(shttpl);
|
||||||
#ifdef TIVO_SUPPORT
|
#ifdef TIVO_SUPPORT
|
||||||
if (sbeacon >= 0)
|
if (sbeacon >= 0)
|
||||||
close(sbeacon);
|
close(sbeacon);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < n_lan_addr; i++)
|
for (i = 0; i < n_lan_addr; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user