mirror of
https://github.com/status-im/miniupnp.git
synced 2025-02-25 12:15:34 +00:00
UPNP_VERSION_MAJOR / UPNP_VERSION_MINOR macros defined in config.h
This commit is contained in:
parent
50c68a9f03
commit
7ae5783d85
@ -87,8 +87,26 @@ echo "" >> ${CONFIGFILE}
|
||||
echo "#include <inttypes.h>" >> ${CONFIGFILE}
|
||||
echo "" >> ${CONFIGFILE}
|
||||
echo "#define MINIUPNPD_VERSION \"`cat VERSION`\"" >> ${CONFIGFILE}
|
||||
echo "" >> ${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}
|
||||
|
||||
# OS Specific stuff
|
||||
case $OS_NAME in
|
||||
|
@ -140,8 +140,8 @@ static const struct XMLElt rootDesc[] =
|
||||
#else
|
||||
{"device", INITHELPER(5,12)},
|
||||
#endif
|
||||
{"/major", "2"},
|
||||
{"/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>2</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>");
|
||||
|
@ -22,10 +22,10 @@
|
||||
#define UPNP_VERSION_STRING "UPnP/1.0"
|
||||
/* according to "UPnP Device Architecture 1.1" */
|
||||
#define UPNP_VERSION_STRING "UPnP/1.1"
|
||||
#else
|
||||
/* 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user