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 segfault in linphonec on answer command #57

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

Conversation

uli7
Copy link

@uli7 uli7 commented Jan 2, 2018

with this patch it does not segfault any more

@kwirk
Copy link

kwirk commented Feb 8, 2018

I also had this issue. Patch didn't work for autoanswer, but can be fixed in the same way. Resulting patch:

diff -r -U3 linphone-3.12.0/console/commands.c linphone-3.12.0_/console/commands.c
--- linphone-3.12.0/console/commands.c	2017-07-21 08:36:30.000000000 +0100
+++ linphone-3.12.0_/console/commands.c	2018-02-05 19:02:10.601003972 +0000
@@ -786,8 +786,7 @@
 	{
 		int nb=(int)bctbx_list_size(linphone_core_get_calls(lc));
 		if (nb==1){
-			//if just one call is present answer the only one in passing NULL to the linphone_core_accept_call ...
-			if ( -1 == linphone_core_accept_call(lc, NULL) )
+			if ( -1 == linphone_core_accept_call(lc, linphone_core_get_current_call(lc)) )
 			{
 				linphonec_out("Fail to accept incoming call\n");
 			}
diff -r -U3 linphone-3.12.0/console/linphonec.c linphone-3.12.0_/console/linphonec.c
--- linphone-3.12.0/console/linphonec.c	2017-07-21 08:36:30.000000000 +0100
+++ linphone-3.12.0_/console/linphonec.c	2018-02-05 19:29:23.703959682 +0000
@@ -1023,7 +1023,7 @@
 	linphone_core_iterate(opm);
 	if (answer_call){
 		fprintf (stdout, "-------auto answering to call-------\n" );
-		linphone_core_accept_call(opm,NULL);
+		linphone_core_accept_call(opm,linphone_core_get_current_call(opm));
 		answer_call=FALSE;
 	}
 	/* auto call handling */

@pergolafabio
Copy link

Hi, any progress here on this patch ?

@blop
Copy link

blop commented Sep 30, 2022

Can we merge this patch one day ? ;-)
@Viish maybe ?

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

4 participants