Lines 824-836
m_WanService(NULL)
Link Here
|
824 |
// Null string at first |
824 |
// Null string at first |
825 |
std::ostringstream msg; |
825 |
std::ostringstream msg; |
826 |
|
826 |
|
|
|
827 |
// Declare those here to avoid |
828 |
// "jump to label ‘error’ [-fpermissive] crosses initialization |
829 |
// of ‘char* ipAddress’" |
830 |
unsigned short port; |
831 |
char *ipAddress; |
832 |
|
827 |
// Start UPnP |
833 |
// Start UPnP |
828 |
int ret; |
834 |
int ret; |
829 |
char *ipAddress = NULL; |
835 |
ret = UpnpInit2(0, udpPort); |
830 |
unsigned short port = 0; |
|
|
831 |
ret = UpnpInit(ipAddress, udpPort); |
832 |
if (ret != UPNP_E_SUCCESS) { |
836 |
if (ret != UPNP_E_SUCCESS) { |
833 |
msg << "error(UpnpInit): Error code "; |
837 |
msg << "error(UpnpInit2): Error code "; |
834 |
goto error; |
838 |
goto error; |
835 |
} |
839 |
} |
836 |
port = UpnpGetServerPort(); |
840 |
port = UpnpGetServerPort(); |