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

Use bool over int for the turnutils_uclient program #1420

Merged
merged 8 commits into from
May 30, 2024

Conversation

jonesmz
Copy link
Contributor

@jonesmz jonesmz commented Jan 30, 2024

Converts all of the variables in the uclient program that should be bool but weren't.

A few other minor adjustments made at the behest of clang-tidy, but this change does not address all of clang-tidy's complaints.

@@ -348,23 +350,23 @@
}
}

static int clnet_allocate(int verbose, app_ur_conn_info *clnet_info, ioa_addr *relay_addr, int af, char *turn_addr,
static int clnet_allocate(bool verbose, app_ur_conn_info *clnet_info, ioa_addr *relay_addr, int af, char *turn_addr,

Check warning

Code scanning / PREfast

Function uses '133496' bytes of stack. Consider moving some data to heap. Warning

Function uses '133496' bytes of stack. Consider moving some data to heap.
@@ -746,7 +753,7 @@
return 0;
}

static int turn_channel_bind(int verbose, uint16_t *chn, app_ur_conn_info *clnet_info, ioa_addr *peer_addr) {
static int turn_channel_bind(bool verbose, uint16_t *chn, app_ur_conn_info *clnet_info, ioa_addr *peer_addr) {

Check warning

Code scanning / PREfast

Function uses '131236' bytes of stack. Consider moving some data to heap. Warning

Function uses '131236' bytes of stack. Consider moving some data to heap.
@@ -837,7 +844,7 @@
return 0;
}

static int turn_create_permission(int verbose, app_ur_conn_info *clnet_info, ioa_addr *peer_addr, int addrnum) {
static int turn_create_permission(bool verbose, app_ur_conn_info *clnet_info, ioa_addr *peer_addr, int addrnum) {

Check warning

Code scanning / PREfast

Function uses '131368' bytes of stack. Consider moving some data to heap. Warning

Function uses '131368' bytes of stack. Consider moving some data to heap.
@@ -1434,10 +1432,10 @@

//////////// RFC 6062 ///////////////

int turn_tcp_connect(int verbose, app_ur_conn_info *clnet_info, ioa_addr *peer_addr) {
int turn_tcp_connect(bool verbose, app_ur_conn_info *clnet_info, ioa_addr *peer_addr) {

Check warning

Code scanning / PREfast

Function uses '65556' bytes of stack. Consider moving some data to heap. Warning

Function uses '65556' bytes of stack. Consider moving some data to heap.
src/apps/uclient/session.h Outdated Show resolved Hide resolved
src/apps/uclient/session.h Outdated Show resolved Hide resolved
src/apps/uclient/startuclient.h Outdated Show resolved Hide resolved
src/apps/uclient/startuclient.h Outdated Show resolved Hide resolved
src/apps/uclient/uclient.c Outdated Show resolved Hide resolved
src/apps/uclient/uclient.h Outdated Show resolved Hide resolved
src/apps/uclient/uclient.h Outdated Show resolved Hide resolved
@eakraly
Copy link
Collaborator

eakraly commented May 27, 2024

Thank you @jonesmz - I left a few comments

@eakraly eakraly merged commit ad94684 into coturn:master May 30, 2024
53 of 54 checks passed
@jonesmz jonesmz deleted the uclient-bools branch May 30, 2024 04:13
maddymeows pushed a commit to maddymeows/coturn that referenced this pull request Jun 2, 2024
Converts all of the variables in the uclient program that should be bool
but weren't.

A few other minor adjustments made at the behest of clang-tidy, but this
change does not address all of clang-tidy's complaints.
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

Successfully merging this pull request may close these issues.

None yet

2 participants