Merge branch 'uda_20'

This commit is contained in:
Thomas Bernard 2015-09-21 22:40:16 +02:00
commit 2372d7bdd9
4 changed files with 31 additions and 12 deletions

View File

@ -40,9 +40,7 @@ CONFIGFILE=`mktemp tmp.config.h.XXXXXXXXXX`
CONFIGFILE_FINAL="config.h"
CONFIGMACRO="CONFIG_H_INCLUDED"
# version reported in XML descriptions
#UPNP_VERSION=20070827
UPNP_VERSION=`date +"%Y%m%d"`
MINIUPNPD_DATE=`date +"%Y%m%d"`
# Facility to syslog
LOG_MINIUPNPD="LOG_DAEMON"
@ -90,8 +88,26 @@ echo "" >> ${CONFIGFILE}
echo "#include <inttypes.h>" >> ${CONFIGFILE}
echo "" >> ${CONFIGFILE}
echo "#define MINIUPNPD_VERSION \"`cat VERSION`\"" >> ${CONFIGFILE}
echo "#define MINIUPNPD_DATE \"$MINIUPNPD_DATE\"" >> ${CONFIGFILE}
echo "" >> ${CONFIGFILE}
cat >> ${CONFIGFILE} <<EOF
#ifndef XSTR
#define XSTR(s) STR(s)
#define STR(s) #s
#endif /* XSTR */
EOF
echo "" >> ${CONFIGFILE}
cat >> ${CONFIGFILE} <<EOF
/* UPnP version reported in XML descriptions
* 1.0 / 1.1 / 2.0 depending on which UDA (UPnP Device Architecture) Version */
#define UPNP_VERSION_MAJOR 2
#define UPNP_VERSION_MINOR 0
#define UPNP_VERSION_MAJOR_STR XSTR(UPNP_VERSION_MAJOR)
#define UPNP_VERSION_MINOR_STR XSTR(UPNP_VERSION_MINOR)
EOF
echo "" >> ${CONFIGFILE}
echo "#define UPNP_VERSION \"$UPNP_VERSION\"" >> ${CONFIGFILE}
# OS Specific stuff
case $OS_NAME in

View File

@ -1,7 +1,7 @@
/* $Id: upnpdescgen.c,v 1.77 2014/03/10 11:04:53 nanard Exp $ */
/* MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* (c) 2006-2014 Thomas Bernard
* (c) 2006-2015 Thomas Bernard
* This software is subject to the conditions detailed
* in the LICENCE file provided within the distribution */
@ -140,8 +140,8 @@ static const struct XMLElt rootDesc[] =
#else
{"device", INITHELPER(5,12)},
#endif
{"/major", "1"},
{"/minor", "0"},
{"/major", UPNP_VERSION_MAJOR_STR},
{"/minor", UPNP_VERSION_MINOR_STR},
/* 5 */
{"/deviceType", DEVICE_TYPE_IGD},
/* urn:schemas-upnp-org:device:InternetGatewayDevice:1 or 2 */
@ -976,7 +976,8 @@ genServiceDesc(int * len, const struct serviceDesc * s)
str = strcat_char(str, len, &tmplen, '>');
str = strcat_str(str, len, &tmplen,
"<specVersion><major>1</major><minor>0</minor></specVersion>");
"<specVersion><major>" UPNP_VERSION_MAJOR_STR "</major>"
"<minor>" UPNP_VERSION_MINOR_STR "</minor></specVersion>");
i = 0;
str = strcat_str(str, len, &tmplen, "<actionList>");

View File

@ -22,7 +22,7 @@
#define WANDEV_MANUFACTURERURL "http://miniupnp.free.fr/"
#define WANDEV_MODELNAME "WAN Device"
#define WANDEV_MODELDESCRIPTION "WAN Device"
#define WANDEV_MODELNUMBER UPNP_VERSION
#define WANDEV_MODELNUMBER MINIUPNPD_DATE
#define WANDEV_MODELURL "http://miniupnp.free.fr/"
#define WANDEV_UPC "000000000000"
/* UPC is 12 digit (barcode) */
@ -32,7 +32,7 @@
#define WANCDEV_MANUFACTURERURL WANDEV_MANUFACTURERURL
#define WANCDEV_MODELNAME "MiniUPnPd"
#define WANCDEV_MODELDESCRIPTION "MiniUPnP daemon"
#define WANCDEV_MODELNUMBER UPNP_VERSION
#define WANCDEV_MODELNUMBER MINIUPNPD_DATE
#define WANCDEV_MODELURL "http://miniupnp.free.fr/"
#define WANCDEV_UPC "000000000000"
/* UPC is 12 digit (barcode) */

View File

@ -1,7 +1,7 @@
/* $Id: upnphttp.h,v 1.40 2014/12/09 16:41:21 nanard Exp $ */
/* MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* (c) 2006-2014 Thomas Bernard
* (c) 2006-2015 Thomas Bernard
* This software is subject to the conditions detailed
* in the LICENCE file provided within the distribution */
@ -20,10 +20,12 @@
#if 0
/* according to "UPnP Device Architecture 1.0" */
#define UPNP_VERSION_STRING "UPnP/1.0"
#else
/* according to "UPnP Device Architecture 1.1" */
#define UPNP_VERSION_STRING "UPnP/1.1"
/* according to "UPnP Device Architecture 2.0" */
#define UPNP_VERSION_STRING "UPnP/2.0"
#endif
#define UPNP_VERSION_STRING "UPnP/" UPNP_VERSION_MAJOR_STR "." UPNP_VERSION_MINOR_STR
/* server: HTTP header returned in all HTTP responses : */
#define MINIUPNPD_SERVER_STRING OS_VERSION " " UPNP_VERSION_STRING " MiniUPnPd/" MINIUPNPD_VERSION