In this method, if any of the error cases hit that cause a 'return' to happen, the finishPrint() method is never called, and you get unbalanced structure warnings untill your log fills up.
I fixed this with a goto in my code, but you may prefer different methods... Thanks, Ben int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg) { int ret, i; H225Connect_UUIE *connect; H245OpenLogicalChannel* olc; ASN1OCTET msgbuf[MAXMSGLEN]; ooLogicalChannel * pChannel = NULL; H245H2250LogicalChannelParameters * h2250lcp = NULL; if(!q931Msg->userInfo) { OOTRACEERR3("Error: UUIE not found in received H.225 Connect message" " (%s, %s)\n", call->callType, call->callToken); /* Mark call for clearing */ if(call->callState < OO_CALL_CLEAR) { call->callEndReason = OO_REASON_INVALIDMESSAGE; call->callState = OO_CALL_CLEAR; } return OO_FAILED; } /* Retrieve the connect message from the user-user IE */ connect = q931Msg->userInfo->h323_uu_pdu.h323_message_body.u.connect; if(connect == NULL) { OOTRACEERR3("Error: Received Connect message does not have Connect UUIE" " (%s, %s)\n", call->callType, call->callToken); /* Mark call for clearing */ if(call->callState < OO_CALL_CLEAR) { call->callEndReason = OO_REASON_INVALIDMESSAGE; call->callState = OO_CALL_CLEAR; } return OO_FAILED; } /*Handle fast-start */ if(OO_TESTFLAG (call->flags, OO_M_FASTSTART) && !OO_TESTFLAG (call->flags, OO_M_FASTSTARTANSWERED)) { if(!connect->m.fastStartPresent) { OOTRACEINFO3("Remote endpoint has rejected fastStart. (%s, %s)\n", call->callType, call->callToken); /* Clear all channels we might have created */ ooClearAllLogicalChannels(call); OO_CLRFLAG (call->flags, OO_M_FASTSTART); } } if (connect->m.fastStartPresent && !OO_TESTFLAG(call->flags, OO_M_FASTSTARTANSWERED)) { /* For printing the decoded message to log, initialize handler. */ initializePrintHandler(&printHandler, "FastStart Elements"); /* Set print handler */ setEventHandler (call->pctxt, &printHandler); for(i=0; i<(int)connect->fastStart.n; i++) { olc = NULL; /* memset(msgbuf, 0, sizeof(msgbuf));*/ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt, sizeof(H245OpenLogicalChannel)); if(!olc) { OOTRACEERR3("ERROR:Memory - ooOnReceivedSignalConnect - olc" "(%s, %s)\n", call->callType, call->callToken); /*Mark call for clearing */ if(call->callState < OO_CALL_CLEAR) { call->callEndReason = OO_REASON_LOCAL_CLEARED; call->callState = OO_CALL_CLEAR; } ret = OO_FAILED; goto fpout_err; } -- Ben Greear <[EMAIL PROTECTED]> Candela Technologies Inc http://www.candelatech.com ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ ooh323c-devel mailing list ooh323c-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ooh323c-devel