Quantcast
Channel: Ignite Realtime : Unanswered Discussions - Support
Viewing all articles
Browse latest Browse all 4979

Null Pointer Exception in JingleManager

$
0
0

<iq to="user2@messapp/test" id="a000W-69" type="set" from="user1@messapp/test"><jingle xmlns="urn:xmpp:tmp:jingle" initiator="user1@messapp/test" responder="user2@messapp/test" action="SESSION_INITIATE" sid="9018782703679253170"><content creator="initiator" name="JMF"><description xmlns="urn:xmpp:tmp:jingle:apps:rtp"><payload-type id="3" name="gsm" channels="1" clockrate="0"/><payload-type id="4" name="g723" channels="1" clockrate="0"/><payload-type id="0" name="PCMU" channels="1" clockrate="16000"/></description><transport xmlns="urn:xmpp:tmp:jingle:transports:ice-udp"/></content></jingle></iq>

 

While parsing above jingle stanza in JingleManger, null pointer exception being thrown in following function at jin.getAction()

 

private void initJingleSessionRequestListeners() {

        StanzaFilter initRequestFilter = new StanzaFilter() {

            // Return true if we accept this packet

            public boolean accept(Stanza pin) {

                if (pin instanceof IQ) {

                    IQ iq = (IQ) pin;

                    if (iq.getType().equals(IQ.Type.set)) {

                        if (iq instanceof Jingle) {

                            Jingle jin = (Jingle) pin;

                            if (jin.getAction().equals(JingleActionEnum.SESSION_INITIATE)) {

                                return true;

                            }

                        }

                    }

                }

                return false;

            }

        };

 

        jingleSessionRequestListeners = new ArrayList<JingleSessionRequestListener>();

 

        // Start a packet listener for session initiation requests

        connection.addAsyncStanzaListener(new StanzaListener() {

            public void processPacket(Stanza packet) {

                triggerSessionRequested((Jingle) packet);

            }

        }, initRequestFilter);

    }


Viewing all articles
Browse latest Browse all 4979

Trending Articles