[Freeswitch-dev] Unreachable code in mod_spidermonkey.c (event_chat_execute)

Anthony Minessale anthony.minessale at gmail.com
Mon Oct 1 21:52:27 MSD 2012


also see latest commit in HEAD, and if it works close the jira

On Mon, Oct 1, 2012 at 11:39 AM, Ken Rice <krice at freeswitch.org> wrote:

>  Jira Please
>
>
>
> On 10/1/12 11:07 AM, "Niels Thomsen" <niels.thomsen at fentechnology.co.uk>
> wrote:
>
> There’s a bit of unreachable code in mod_spidermonkey which means that the
> event_chat_execute function becomes a no-op.
>
> This may be intentional, of course, but it doesn’t look like it is…
>
> static JSBool event_chat_execute(JSContext * cx, JSObject * obj, uintN
> argc, jsval * argv, jsval * rval)
> {
>                 struct event_obj *eo = JS_GetPrivate(cx, obj);
>
>                 if (eo) {
>                                 if (argc > 0) {
>                                                 char *app =
> JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
>                                                 char *arg = NULL;
>
>                                                 if (argc > 1) {
>                                                                 arg =
> JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
>                                                 }
>
>                                                 goto end;
>
> //-- this code is never executed
>                                                 switch_core_execute_chat_app(eo->event,
> app, arg);
>
>                                                 *rval =
> BOOLEAN_TO_JSVAL(JS_TRUE);
>                                                 return JS_TRUE;
>                                 }
>                 }
>
>  end:
>
>                 *rval = BOOLEAN_TO_JSVAL(JS_FALSE);
>                 return JS_FALSE;
> }
>
> - Niels
>
> ------------------------------
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>
> --
> Ken
> *http://www.FreeSWITCH.org
> http://www.ClueCon.com
> http://www.OSTAG.org
> *irc.freenode.net #freeswitch
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>


-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20121001/8cf5ad4f/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list