bayonne-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bayonne-devel] Understanding the code for DCB conference


From: David Sugar
Subject: Re: [Bayonne-devel] Understanding the code for DCB conference
Date: Thu, 04 Nov 2004 22:06:00 -0500
User-agent: Mozilla Thunderbird 0.9 (Macintosh/20041103)

You call both Trunk::error() and trunkSignal(TRUNK_SIGNAL_ERROR). I think this is the root cause. At the time the system is executing in the state handler, it is still pointing to the current line in script. Trunk::error() sets the error message, and either incs the script or calls ^error if one is found. TRUNK_SIGNAL_ERROR may end up incing it again since there is no handler. In many of the drivers where TRUNK_SIGNAL_ERROR is used, you would normally see a direct setSymbol(SYM_ERROR, ...) followed by a call to trunkSignal(TRUNK_SIGNAL_ERROR), rather than calling Trunk::error().

Etoile Dièse wrote:
Hello,

We gave a patch for using a DCB card (Dialogic conference card) and we have it now in production. Some problem are raising when using the conference.enter directive maybe due to our misunderstanding of the Bayonne API. In the part "case CONF_ENTER:" of the conferenceHandler for example we have that:

                        // failed
                        if (ptr == NULL) {
                                Trunk::error("conference-not-entered");
                                handler = &DialogicTrunk::stepHandler;
                                trunkSignal(TRUNK_SIGNAL_ERROR);
                                return true;
                        }

                        // succeeded
                        else {
                                strncpy(data.conference.name, ptr, 255);
                                setSymbol("confName", ptr);
                                handler = &DialogicTrunk::stepHandler;
                                stopChannel(EV_ASYNC);
                                _stopping_state = true;
                                trunkSignal(TRUNK_SIGNAL_STEP);
                                return true;
                        }

If entering fails and no error event is defined we enter an infinite loop.
Does anybody know what those instructions mean in a handler and what are the consequences :

- stopChannel(EV_ASYNC);
- _stopping_state = true;
- trunkSignal(TRUNK_SIGNAL_STEP);
- and overall what is the difference between "return true" and "return false"

Cheers




reply via email to

[Prev in Thread] Current Thread [Next in Thread]