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

fix compiler warnings when WITH_TCP is not defined #5054

Closed
wants to merge 1 commit into from
Closed

fix compiler warnings when WITH_TCP is not defined #5054

wants to merge 1 commit into from

Conversation

chiouss
Copy link

@chiouss chiouss commented Jun 13, 2023

Fix some compiler warnings here.

@chiouss chiouss changed the title fix compiler warnings when WITH_TCP id not defined fix compiler warnings when WITH_TCP is not defined Jun 13, 2023
@alandekok
Copy link
Member

I've manually merged the patch to listen.c

The patch to process.c doesn't make any sense. I don't see why it's necessary, and it changes the logic of the code completely.

@chiouss
Copy link
Author

chiouss commented Jun 13, 2023

I've manually merged the patch to listen.c

@alandekok Thanks.

The patch to process.c doesn't make any sense. I don't see why it's necessary, and it changes the logic of the code completely.

because the listener_is_eol label is inside the WITH_TCP defined
https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/src/main/process.c#L5449

@alandekok
Copy link
Member

@Chious Removing the goto means that the listener state will be RAD_LISTEN_STATUS_EOL, which then isn't handled when building without TCP. As a result, the listener will stick around, and won't be cleaned up.

The solution is to set the listener state to RAD_LISTEN_REMOVE_NOW. I'll push a fix.

@chiouss
Copy link
Author

chiouss commented Jun 14, 2023

@alandekok thanks.

@chiouss
Copy link
Author

chiouss commented Jun 20, 2023

Hi @alandekok ,
71c8188 makes compiler error.

src/main/process.c: In function 'event_new_fd':
src/main/process.c:5526:43: error: 'proxy_eol_cb' undeclared (first use in this function)
     fr_packet_list_walk(proxy_list, this, proxy_eol_cb);
                                           ^
src/main/process.c:5526:43: note: each undeclared identifier is reported only once for each function it appears in
src/main/process.c:5550:29: error: 'listen_socket_t {aka struct listen_socket_t}' has no member named 'ev'
           this, &when, &sock->ev)) {
                             ^
scripts/boiler.mk:644: recipe for target 'build/objs/src/main/process.lo' failed
make[3]: *** [build/objs/src/main/process.lo] Error 1

@alandekok
Copy link
Member

I'll take a look, but building without TCP isn't a high priority. There are really few reasons to do this unless you have a_very_ constrained environment.

@chiouss
Copy link
Author

chiouss commented Jun 20, 2023

I'll take a look, but building without TCP isn't a high priority. There are really few reasons to do this unless you have a_very_ constrained environment.

Thanks. I'm running it on a embeded device so I've disabled/removed all unnecessary modules and feature flags to make it smaller to fit the device's flash.

I'll change the status RAD_LISTEN_STATUS_EOL to RAD_LISTEN_STATUS_REMOVE_NOW for a quick fix without TCP build.

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.

2 participants