Remove an unused variable ifndef INET_IPV6
This commit is contained in:
parent
692813d03e
commit
40ddff1096
@ -502,10 +502,14 @@ static int get_miniserver_sockets(
|
|||||||
MiniServerSockArray *out,
|
MiniServerSockArray *out,
|
||||||
/*! [in] port on which the server is listening for incoming IPv4
|
/*! [in] port on which the server is listening for incoming IPv4
|
||||||
* connections. */
|
* connections. */
|
||||||
uint16_t listen_port4,
|
uint16_t listen_port4
|
||||||
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
|
,
|
||||||
/*! [in] port on which the server is listening for incoming IPv6
|
/*! [in] port on which the server is listening for incoming IPv6
|
||||||
* connections. */
|
* connections. */
|
||||||
uint16_t listen_port6)
|
uint16_t listen_port6
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
char errorBuffer[ERROR_BUFFER_LEN];
|
char errorBuffer[ERROR_BUFFER_LEN];
|
||||||
struct sockaddr_storage __ss_v4;
|
struct sockaddr_storage __ss_v4;
|
||||||
@ -760,10 +764,6 @@ static int get_miniserver_sockets(
|
|||||||
out->miniServerSock4 = listenfd4;
|
out->miniServerSock4 = listenfd4;
|
||||||
#ifdef UPNP_ENABLE_IPV6
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
out->miniServerSock6 = listenfd6;
|
out->miniServerSock6 = listenfd6;
|
||||||
#else
|
|
||||||
/* Silence compiler warning message:
|
|
||||||
* warning: unused parameter ‘listen_port6’ */
|
|
||||||
listen_port6 = 0u;
|
|
||||||
#endif
|
#endif
|
||||||
return UPNP_E_SUCCESS;
|
return UPNP_E_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -868,7 +868,11 @@ int StartMiniServer(
|
|||||||
#ifdef INTERNAL_WEB_SERVER
|
#ifdef INTERNAL_WEB_SERVER
|
||||||
/* V4 and V6 http listeners. */
|
/* V4 and V6 http listeners. */
|
||||||
ret_code = get_miniserver_sockets(
|
ret_code = get_miniserver_sockets(
|
||||||
miniSocket, *listen_port4, *listen_port6);
|
miniSocket, *listen_port4
|
||||||
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
|
, *listen_port6
|
||||||
|
#endif
|
||||||
|
);
|
||||||
if (ret_code != UPNP_E_SUCCESS) {
|
if (ret_code != UPNP_E_SUCCESS) {
|
||||||
free(miniSocket);
|
free(miniSocket);
|
||||||
return ret_code;
|
return ret_code;
|
||||||
|
@ -186,7 +186,9 @@ static int NewRequestHandler(
|
|||||||
unsigned long replyAddr = inet_addr(gIF_IPV4);
|
unsigned long replyAddr = inet_addr(gIF_IPV4);
|
||||||
/* a/c to UPNP Spec */
|
/* a/c to UPNP Spec */
|
||||||
int ttl = 4;
|
int ttl = 4;
|
||||||
|
#ifdef INET_IPV6
|
||||||
int hops = 1;
|
int hops = 1;
|
||||||
|
#endif
|
||||||
char buf_ntop[INET6_ADDRSTRLEN];
|
char buf_ntop[INET6_ADDRSTRLEN];
|
||||||
int ret = UPNP_E_SUCCESS;
|
int ret = UPNP_E_SUCCESS;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user