Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the code #1327

Open
KangLin opened this issue Nov 24, 2023 · 0 comments
Open

Refactor the code #1327

KangLin opened this issue Nov 24, 2023 · 0 comments

Comments

@KangLin
Copy link
Contributor

KangLin commented Nov 24, 2023

Refactor the code style

  1. Remove exit() and free resource
  2. Remove goto
  3. Optimized "{}" multiple nesting,
    Replace c89 (restrict variable declaration position at the beginning of the block)
    with c11 (no restriction variable declaration position in the block)
  4. Optimized the multiple nesting and length of if{}. see: Refactor: peer_input_handle #1325 Refactor: send_data_from_ioa_socket_nbh #1326
  5. The length of the function is optimized and divided into multiple single-function functions

refactor log

  1. Replace perror with TURN_LOG_FUNC
  2. Use a mature logging library #1344

Use cmake and remove configure

The current configure and Makefile.in is not standard automake. so it maintainability is bad.

Refactor the program flow

KangLin added a commit to KangLin/coturn that referenced this issue Nov 24, 2023
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Replace perror with TURN_LOG_FUNC
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Replace perror with TURN_LOG_FUNC
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Replace perror with TURN_LOG_FUNC
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Replace perror with TURN_LOG_FUNC
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Replace perror with TURN_LOG_FUNC
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Replace perror with TURN_LOG_FUNC
KangLin added a commit to KangLin/coturn that referenced this issue Nov 27, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 28, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 28, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Replace perror with TURN_LOG_FUNC
KangLin added a commit to KangLin/coturn that referenced this issue Nov 28, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 28, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 28, 2023
- Remove exit() and free resource
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
- Replace perror with TURN_LOG_FUNC
KangLin added a commit to KangLin/coturn that referenced this issue Nov 28, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
KangLin added a commit to KangLin/coturn that referenced this issue Nov 28, 2023
- Remove goto
- Optimized "{}" multiple nesting,
- Replace c98 (restrict variable declaration position at the beginning of the block)
  with c11 (no restriction variable declaration position in the block)
  Optimized the multiple nesting and length of if{}.
@KangLin KangLin changed the title Refactor the code style Refactor the code Jan 18, 2024
KangLin added a commit to KangLin/coturn that referenced this issue Apr 10, 2024
KangLin added a commit to KangLin/coturn that referenced this issue Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant