Fix erroneous startup message

This commit is contained in:
Ron Pedde 2006-07-09 23:03:20 +00:00
parent a574c2f752
commit d8bdbe234d
2 changed files with 18 additions and 9 deletions

View File

@ -499,8 +499,8 @@ int main(int argc, char *argv[]) {
DPRINTF(E_FATAL,L_MISC,"Error getting song count: %s\n",perr);
}
DPRINTF(E_LOG,L_MAIN,"Scanned %d songs in %d seconds\n",song_count,
end_time-start_time);
DPRINTF(E_LOG,L_MAIN,"Serving %d songs. Startup complete in %d seconds\n",
song_count,end_time-start_time);
if(conf_get_int("general","rescan_interval",0))
config.reload = 1; /* force a reload on start */

View File

@ -34,6 +34,7 @@ static int _os_sock_to_fd(SOCKET sock);
static void _os_lock(void);
static void _os_unlock(void);
static BOOL WINAPI _os_cancelhandler(DWORD dwCtrlType);
static void _os_phandle_dump(void);
extern int gettimeout(struct timeval end,struct timeval *timeoutp);
@ -100,22 +101,29 @@ int os_init(int foreground, char *runas) {
}
/**
* shutdown the system-specific stuff started in os_init.
* dump pseudo-handles
*/
void os_deinit(void) {
void _os_phandle_dump(void) {
int fd;
_os_socket_shutdown();
/* walk through and log the different sockets */
fd=0;
fd=1; /* skip the main listen socket */
while(fd < MAXDESC) {
if(file_info[fd].state) {
DPRINTF(E_DBG,L_MISC,"Socket %d (%d): State %s\n",fd,fd+MAXDESC,
DPRINTF(E_LOG,L_MISC,"Socket %d (%d): State %s\n",fd,fd+MAXDESC,
os_w32_socket_states[file_info[fd].state]);
}
fd++;
}
}
/**
* shutdown the system-specific stuff started in os_init.
*/
void os_deinit(void) {
_os_socket_shutdown();
_os_phandle_dump();
if(os_serviceflag) {
/* then we need to stop the service */
@ -213,6 +221,7 @@ int _os_sock_to_fd(SOCKET sock) {
if(fd == MAXDESC) {
_os_unlock();
_os_phandle_dump();
DPRINTF(E_FATAL,L_MISC,"Out of pseudo file handles. See ya\n");
}