fix #141, support tun0(vpn network device) ip retrieve. 0.9.179.
正在显示
3 个修改的文件
包含
9 行增加
和
1 行删除
@@ -207,6 +207,7 @@ Supported operating systems and hardware: | @@ -207,6 +207,7 @@ Supported operating systems and hardware: | ||
207 | * 2013-10-17, Created.<br/> | 207 | * 2013-10-17, Created.<br/> |
208 | 208 | ||
209 | ## History | 209 | ## History |
210 | +* 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. | ||
210 | * v1.0, 2014-07-27, support build on OSX(Darwin). 0.9.177 | 211 | * v1.0, 2014-07-27, support build on OSX(Darwin). 0.9.177 |
211 | * v1.0, 2014-07-27, api connections add udp, add disk iops. 0.9.176 | 212 | * v1.0, 2014-07-27, api connections add udp, add disk iops. 0.9.176 |
212 | * v1.0, 2014-07-26, complete config utest. 0.9.173 | 213 | * v1.0, 2014-07-26, complete config utest. 0.9.173 |
@@ -930,6 +930,13 @@ void retrieve_local_ipv4_ips() | @@ -930,6 +930,13 @@ void retrieve_local_ipv4_ips() | ||
930 | while (p != NULL) { | 930 | while (p != NULL) { |
931 | sockaddr* addr = p->ifa_addr; | 931 | sockaddr* addr = p->ifa_addr; |
932 | 932 | ||
933 | + // ignore the tun0 network device, | ||
934 | + // which addr is NULL. | ||
935 | + // @see: https://github.com/winlinvip/simple-rtmp-server/issues/141 | ||
936 | + if (!addr) { | ||
937 | + continue; | ||
938 | + } | ||
939 | + | ||
933 | // retrieve ipv4 addr | 940 | // retrieve ipv4 addr |
934 | if (addr->sa_family == AF_INET) { | 941 | if (addr->sa_family == AF_INET) { |
935 | in_addr* inaddr = &((sockaddr_in*)addr)->sin_addr; | 942 | 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. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
31 | // current release version | 31 | // current release version |
32 | #define VERSION_MAJOR "0" | 32 | #define VERSION_MAJOR "0" |
33 | #define VERSION_MINOR "9" | 33 | #define VERSION_MINOR "9" |
34 | -#define VERSION_REVISION "178" | 34 | +#define VERSION_REVISION "179" |
35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION | 35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION |
36 | // server info. | 36 | // server info. |
37 | #define RTMP_SIG_SRS_KEY "SRS" | 37 | #define RTMP_SIG_SRS_KEY "SRS" |
-
请 注册 或 登录 后发表评论