Re: GSM_CancelCall not found
Michal Čihař <[email protected]>
| Newsgroups | gmane.linux.drivers.gammu |
|---|---|
| Message-ID | <[email protected]> |
Hi Dne 30.7.2016 v 21:00 Paulo Roberto napsal(a): > Hello Guys, > I do need your help to solve this issue. > I made some progress since the last e-mail. I fetched the last source > code of gammu (commit: 70ab47136f12be6478b3892f43b913d2a23a3274), built > it and test it with my application. > > I'm still unable to Cancel the calls but it is a totally different issue. > The /s->Phone.Functions/ is initialized correctly and it's not /NULL/ > anymore. And for the phone /Samsung GT-E2220/ the /GSM_CancelCall/ > registered function is /ATGEN_CancelCall/ > > The problem now is a stack overflow. > My /Incoming Call Callback/ routine, calls /GSM_CancelCall/ and this one > indirectly call back my /Incoming Call Callback/ routine. A kind of a > recursive infinite loop. > The process continues until there is no space left on the stack and the > OS kills the process. > > Inside my callback I do test the condition: /call->Status == > GSM_CALL_IncomingCall (/Where call is the /GSM_Call/ parameter received) > but for this situation is useless. > > I'm able to avoid this problem by setting a static variable to control > the condition if it is a reentrant call. But it makes my routine not > reentrant anymore. > Besides that, this behavior is different from the Python implementation > where everything works as expected. The Python API hides some ugliness of the C API. On of things it does is that the callbacks are executed at different point. > When the device receives the call, the read message from it is: > > "+CLIP: \"099999999999\",129,\"\",,\"Promocoes Vivo\",0\r\nAT+CSQ\r\r" > > Below, there is the stack backtrace of my application. I stopped it > exactly where my callback function calls the GSM_CancelCall for the > second time. > > #0 GSM_CancelCall (s=0x7ffff5e1d010, ID=0, all=1) at > git/gammu/gammu/libgammu/api.c:913 This line is comment in current git, have you modified the file somehow? BTW: You can look at similar code in Gammu SMSD, which works: https://github.com/gammu/gammu/blob/master/smsd/core.c#L1877 -- Michal Čihař | http://cihar.com/ | https://weblate.org/ ------------------------------------------------------------------------------ _______________________________________________ Gammu-users mailing list - https://lists.sourceforge.net/lists/listinfo/gammu-users
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXoLbsAAoJEPSqIp1NWMJFC68P/2qBTIi4Mxrc/Q9iiaxDnO56 md65b9o/eXDJB25erBIAQqWfj/7KO7ddPXuf4VRGsN7ZZoI2/+FBTD9bdYFbyP8T d7VZ6gJms3xosz3U5cMuaADiIwmns2JD70kvdCQNMkhnIOquDKuduY4rdK//vJDE wk/UPDp4u8+CREihFpXDBn9fkXLoEGEQA2SVxG/AnsMWKhDH1WvMsuTYFdSyutyb kBghSSQmLwjKrbvbZP4CG1el3GZt1sIL1BVZXaR9RAK7xg0CUN8Fd4flXbtHELit vEFe1nj0MtPxAQs8bgTS83cZRuCLqVwKRNhJtrHVqGNgQ5P2u7lC5Lo6pFosLKRd uzn9fefffJSJHMhL6xAE41z7Uc+nt/bPhJ99i0hzfIgxvYJEEuFqq9vRLX0IHls3 qIuguURxhuzTKolJQ3NKRCdP1uClmLNELoOCwQhjFl1hN+kJ1w1suTpC3jwQ0sUC N68GOcTDYecGYoskaYZX8c7bl1hsX6vUcH5Ix2PWIG87uU1VVMYuCy/4HEd7dx3h +WVBbPpkXNKQLx7VYMimox/HbrMm97NpQdMiLCDm24RcyeQfDyk6CyI43RcSGXYB O+zXeEeumaa/iJAGAcZiOJx2NsZhsXLCAfVSYIw6D5fk10b2ufxMQYsylmD4EfqI 0YDAAb77DRl/a2NIQ2zd =Z/qj -----END PGP SIGNATURE-----