mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Remove unreachable issues in code (#3793)
remove unreachable links by python scripts:
```
def is_delete_issue(link):
try:
response = requests.get(link)
except RequestException as e:
print(f"An error occurred while trying to get the link: {e}")
return False
return "This issue has been deleted." in response.text
def remove_unreachable_links(dir):
string_to_search = re.compile(r'// @see https://github\.com/ossrs/srs/issues/.*')
file_list = util.find_files_with_extension(dir, ".cpp", True)
for file in file_list:
lines = []
with open(file, "r", encoding="utf-8") as f:
lines = f.readlines()
with open(file, "w", encoding="utf-8", newline="\n") as f:
for line in lines:
if string_to_search.search(line):
result = re.search(r'https://github\.com/ossrs/srs/issues/\d+', line)
if result:
link = result.group()
if is_delete_issue(link):
print("is_delete_issue link: file: %s, line: %s" % (file, line))
continue
f.write(line)
if __name__ == "__main__":
remove_unreachable_links("srs/trunk/src/")
```
This commit is contained in:
parent
7138edd318
commit
6e6b80d837
13 changed files with 0 additions and 22 deletions
|
|
@ -184,7 +184,6 @@ public:
|
|||
// @param data, the data to send. NULL to flush header only.
|
||||
virtual srs_error_t write(char* data, int size) = 0;
|
||||
// for the HTTP FLV, to writev to improve performance.
|
||||
// @see https://github.com/ossrs/srs/issues/405
|
||||
virtual srs_error_t writev(const iovec* iov, int iovcnt, ssize_t* pnwrite) = 0;
|
||||
|
||||
// WriteHeader sends an HTTP response header with status code.
|
||||
|
|
@ -261,7 +260,6 @@ public:
|
|||
// @param data, the data to send. NULL to flush header only.
|
||||
virtual srs_error_t write(char* data, int size) = 0;
|
||||
// for the HTTP FLV, to writev to improve performance.
|
||||
// @see https://github.com/ossrs/srs/issues/405
|
||||
virtual srs_error_t writev(const iovec* iov, int iovcnt, ssize_t* pnwrite) = 0;
|
||||
|
||||
// WriteHeader sends an HTTP request header with status code.
|
||||
|
|
|
|||
|
|
@ -799,7 +799,6 @@ srs_error_t SrsProtocol::recv_interlaced_message(SrsCommonMessage** pmsg)
|
|||
SrsChunkStream* chunk = NULL;
|
||||
|
||||
// use chunk stream cache to get the chunk info.
|
||||
// @see https://github.com/ossrs/srs/issues/249
|
||||
if (cid < SRS_PERF_CHUNK_STREAM_CACHE) {
|
||||
// already init, use it direclty
|
||||
chunk = cs_cache[cid];
|
||||
|
|
@ -2469,7 +2468,6 @@ srs_error_t SrsRtmpServer::identify_client(int stream_id, SrsRtmpConnType& type,
|
|||
|
||||
// call msg,
|
||||
// support response null first,
|
||||
// @see https://github.com/ossrs/srs/issues/106
|
||||
// TODO: FIXME: response in right way, or forward in edge mode.
|
||||
SrsCallPacket* call = dynamic_cast<SrsCallPacket*>(pkt);
|
||||
if (call) {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ private:
|
|||
#endif
|
||||
// the user-space buffer to fill by reader,
|
||||
// which use fast index and reset when chunk body read ok.
|
||||
// @see https://github.com/ossrs/srs/issues/248
|
||||
// ptr to the current read position.
|
||||
char* p;
|
||||
// ptr to the content end.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue