Skip to content

Commit

Permalink
Squash: Fix bugs for 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jan 23, 2022
1 parent ccc1e75 commit 6b7fc6f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ jobs:
env:
PACKAGER: ${{ secrets.SRS_PACKAGER_DOCKER }}
PACKAGER_DROPLET: ${{ secrets.SRS_PACKAGER_DROPLET }}
PACKAGER_LIGHTHOUSE: ${{ secrets.SRS_PACKAGER_LIGHTHOUSE }}
run: |
echo "Release ossrs/srs:$SRS_TAG"
docker build --tag ossrs/srs:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER -f trunk/Dockerfile .
echo "Release ossrs/droplet:$SRS_TAG"
docker build --tag ossrs/droplet:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER_DROPLET -f trunk/Dockerfile .
echo "Release ossrs/lighthouse:$SRS_TAG"
docker build --tag ossrs/lighthouse:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER_LIGHTHOUSE -f trunk/Dockerfile .
# Docker hub
# TODO: FIXME: If stable, please set the latest from 4.0 to 5.0
Expand All @@ -76,6 +79,10 @@ jobs:
docker tag ossrs/droplet:$SRS_TAG ossrs/droplet:$SRS_MAJOR
#docker tag ossrs/droplet:$SRS_TAG ossrs/droplet:latest
docker push --all-tags ossrs/droplet
#
docker tag ossrs/lighthouse:$SRS_TAG ossrs/lighthouse:$SRS_MAJOR
docker tag ossrs/lighthouse:$SRS_TAG ossrs/lighthouse:latest
docker push --all-tags ossrs/lighthouse
# Aliyun ACR hub
# TODO: FIXME: If stable, please set the latest from 4.0 to 5.0
Expand All @@ -100,6 +107,13 @@ jobs:
docker tag ossrs/droplet:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:$SRS_MAJOR
#docker tag ossrs/droplet:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:latest
docker push --all-tags registry.cn-hangzhou.aliyuncs.com/ossrs/droplet
#
docker tag ossrs/lighthouse:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:$SRS_TAG
docker tag ossrs/lighthouse:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:$SRS_VERSION
docker tag ossrs/lighthouse:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:v$SRS_MAJOR
docker tag ossrs/lighthouse:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:$SRS_MAJOR
docker tag ossrs/lighthouse:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:latest
docker push --all-tags registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse
##################################################################################################################
##################################################################################################################
Expand Down
4 changes: 3 additions & 1 deletion trunk/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ The changelog for SRS.

## SRS 4.0 Changelog

* v4.0, 2022-01-17, Release v4.0-b4, 4.0 beta4, v4.0.230, 144393 lines.
* v4.0, 2022-01-23, Merge [#2886](https://github.com/ossrs/srs/pull/2886): Fix bug when free addrinfo. (#2886). v4.0.233
* v4.0, 2022-01-22, Merge [#2887](https://github.com/ossrs/srs/pull/2887): Fix memory leak in SrsMetaCache. (#2887). v4.0.232
* v4.0, 2022-01-21, Support docker image for [lighthouse](https://hub.docker.com/r/ossrs/lighthouse). v4.0.231
* v4.0, 2022-01-17, Enable rtmp2rtc and rtc2rtmp for docker.conf
* v4.0, 2022-01-17, Support docker image for [droplet](https://hub.docker.com/r/ossrs/droplet). v4.0.230
* v4.0, 2022-01-16, Update README for **Cloud Virtual Machine([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#cloud-virtual-machine) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#cloud-virtual-machine))**
Expand Down
2 changes: 2 additions & 0 deletions trunk/src/app/srs_app_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,8 @@ SrsMetaCache::SrsMetaCache()
SrsMetaCache::~SrsMetaCache()
{
dispose();
srs_freep(vformat);
srs_freep(aformat);
}

void SrsMetaCache::dispose()
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_REVISION 230
#define VERSION_REVISION 233

#endif
2 changes: 1 addition & 1 deletion trunk/src/kernel/srs_kernel_utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ string srs_dns_resolve(string host, int& family)
hints.ai_family = family;

addrinfo* r = NULL;
SrsAutoFree(addrinfo, r);
SrsAutoFreeH(addrinfo, r, freeaddrinfo);
if(getaddrinfo(host.c_str(), NULL, &hints, &r)) {
return "";
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/src/protocol/srs_service_st.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ srs_error_t srs_tcp_connect(string server, int port, srs_utime_t tm, srs_netfd_t
hints.ai_socktype = SOCK_STREAM;

addrinfo* r = NULL;
SrsAutoFree(addrinfo, r);
SrsAutoFreeH(addrinfo, r, freeaddrinfo);
if(getaddrinfo(server.c_str(), sport, (const addrinfo*)&hints, &r)) {
return srs_error_new(ERROR_SYSTEM_IP_INVALID, "get address info");
}
Expand Down Expand Up @@ -248,7 +248,7 @@ srs_error_t srs_tcp_listen(std::string ip, int port, srs_netfd_t* pfd)
hints.ai_flags = AI_NUMERICHOST;

addrinfo* r = NULL;
SrsAutoFreeF(addrinfo, r);
SrsAutoFreeH(addrinfo, r, freeaddrinfo);
if(getaddrinfo(ip.c_str(), sport, (const addrinfo*)&hints, &r)) {
return srs_error_new(ERROR_SYSTEM_IP_INVALID, "getaddrinfo hints=(%d,%d,%d)",
hints.ai_family, hints.ai_socktype, hints.ai_flags);
Expand Down Expand Up @@ -309,7 +309,7 @@ srs_error_t srs_udp_listen(std::string ip, int port, srs_netfd_t* pfd)
hints.ai_flags = AI_NUMERICHOST;

addrinfo* r = NULL;
SrsAutoFree(addrinfo, r);
SrsAutoFreeH(addrinfo, r, freeaddrinfo);
if(getaddrinfo(ip.c_str(), sport, (const addrinfo*)&hints, &r)) {
return srs_error_new(ERROR_SYSTEM_IP_INVALID, "getaddrinfo hints=(%d,%d,%d)",
hints.ai_family, hints.ai_socktype, hints.ai_flags);
Expand Down

0 comments on commit 6b7fc6f

Please sign in to comment.