* Add version number.

This commit is contained in:
Justin Maggard 2009-05-05 02:39:40 +00:00
parent 392654a234
commit 1a26bfba7a
4 changed files with 17 additions and 5 deletions

View File

@ -489,6 +489,10 @@ init(int argc, char * * argv)
case 'f':
i++; /* discarding, the config file is already read */
break;
case 'V':
printf("Version " MINIDLNA_VERSION "\n");
exit(0);
break;
default:
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
@ -512,6 +516,7 @@ init(int argc, char * * argv)
"of daemon uptime.\n"
"\t-B sets bitrates reported by daemon in bits per second.\n"
"\t-w sets the presentation url. Default is http address on port 80\n"
"\t-V print the version number\n"
"", argv[0], pidfilename);
return 1;
}
@ -554,8 +559,13 @@ init(int argc, char * * argv)
}
else
{
#ifdef READYNAS
snprintf(presentationurl, PRESENTATIONURL_MAX_LEN,
"https://%s/admin/", lan_addr[0].str);
#else
snprintf(presentationurl, PRESENTATIONURL_MAX_LEN,
"http://%s/", lan_addr[0].str);
#endif
}
/* set signal handler */
@ -609,10 +619,10 @@ main(int argc, char * * argv)
return 1;
#ifdef READYNAS
DPRINTF(E_WARN, L_GENERAL, "Starting ReadyDLNA...\n");
DPRINTF(E_WARN, L_GENERAL, "Starting ReadyDLNA version " MINIDLNA_VERSION ".\n");
unlink("/ramfs/.upnp-av_scan");
#else
DPRINTF(E_WARN, L_GENERAL, "Starting MiniDLNA...\n");
DPRINTF(E_WARN, L_GENERAL, "Starting MiniDLNA version " MINIDLNA_VERSION ".\n");
#endif
LIST_INIT(&upnphttphead);

View File

@ -32,7 +32,7 @@ enum client_types {
EXbox = 1,
EPS3,
ESamsungTV,
EUnknownClient
EStandardDLNA150 = 100
};
struct media_dir_s {

View File

@ -15,6 +15,8 @@
#include <sqlite3.h>
#define MINIDLNA_VERSION "1.0.8"
#define CLIENT_CACHE_SLOTS 20
#define USE_FORK 1
#define DB_VERSION 1

View File

@ -227,7 +227,7 @@ intervening space) by either an integer or the keyword "infinite". */
}
else if(strcasestr(p, "DLNADOC/1.50"))
{
h->req_client = EUnknownClient;
h->req_client = EStandardDLNA150;
h->reqflags |= FLAG_DLNA;
}
}
@ -335,7 +335,7 @@ next_header:
break;
}
}
else if( (n < EUnknownClient) && (h->req_client == EUnknownClient) )
else if( (n < EStandardDLNA150) && (h->req_client == EStandardDLNA150) )
{
/* If we know the client, but our new detection is generic, use our cached info */
h->reqflags |= clients[n].flags;