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

xml_int/mod_xml_rpc: const compiler errors #2496

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dilyanpalauzov
Copy link
Contributor

Closes #2495.

@andywolk andywolk force-pushed the xml_int_rpc_const_errors branch 4 times, most recently from 91679b7 to 77cc2a1 Compare June 25, 2024 19:07
@andywolk andywolk force-pushed the xml_int_rpc_const_errors branch from 77cc2a1 to 475b64d Compare June 25, 2024 19:58
@Korynkai
Copy link

Korynkai commented Nov 5, 2024

This pull request may introduce an issue with presenting a const where a const is not expected. I am not certain if this is any issue or not (I have not had the time to test both options), but I have made the following patch and figured I should present it in case it is useful and/or the preferred fix (although it is casting pointer types):

diff -Naur freeswitch-1.10.12.pristine/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c freeswitch-1.10.12/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
--- freeswitch-1.10.12.pristine/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c       2024-11-05 19:30:49.844398348 +0000
+++ freeswitch-1.10.12/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c        2024-11-05 19:30:08.446685036 +0000
@@ -359,7 +359,7 @@
 
        err = 686;
 
-       if (!user_attributes(user, domain_name, NULL, NULL, NULL, &allowed_commands)) {
+       if (!user_attributes(user, domain_name, NULL, NULL, NULL, (const char **)(&allowed_commands))) {
                goto end;
        }
 
@@ -944,7 +944,7 @@
                                                        break;
                                                }
 
-                                               ConnRead(r->connP, 2000, NULL, NULL, &readError);
+                                               ConnRead(r->connP, 2000, NULL, NULL, (const char ** const)(&readError));
                                if (readError) {
                                                        succeeded = FALSE;
                                                        free(readError);

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.

Compiler failure in mod_xml_rpc.c (missing const)
2 participants