winlin

fix #141, support tun0(vpn network device) ip retrieve. 0.9.179.

... ... @@ -207,6 +207,7 @@ Supported operating systems and hardware:
* 2013-10-17, Created.<br/>
## History
* v1.0, 2014-07-31, fix [#141](https://github.com/winlinvip/simple-rtmp-server/issues/141), support tun0(vpn network device) ip retrieve. 0.9.179.
* v1.0, 2014-07-27, support build on OSX(Darwin). 0.9.177
* v1.0, 2014-07-27, api connections add udp, add disk iops. 0.9.176
* v1.0, 2014-07-26, complete config utest. 0.9.173
... ...
... ... @@ -930,6 +930,13 @@ void retrieve_local_ipv4_ips()
while (p != NULL) {
sockaddr* addr = p->ifa_addr;
// ignore the tun0 network device,
// which addr is NULL.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/141
if (!addr) {
continue;
}
// retrieve ipv4 addr
if (addr->sa_family == AF_INET) {
in_addr* inaddr = &((sockaddr_in*)addr)->sin_addr;
... ...
... ... @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "178"
#define VERSION_REVISION "179"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
... ...