Hi all,
           In the following function if there is no tuple at that index,
the code goes into the else part. And when tuple is NULL,
tuple->remove(0), is called. Will it not SEG_FAULT ? I'm not sure whether
i'm using the latest src'es or whether this has been fixed, if it is a bug.


UtlBoolean PidfBody::getBasicStatus(int tupleIndex,
                                   UtlString& tupleId,
                                   UtlBoolean& isTupleStatusBasicOpen,
                                   UtlString& contact,
                                   UtlString& tupleNote) const
{
   PidfTuple* tuple = (PidfTuple*) mTuples.at(tupleIndex);
   if(tuple)
   {
       tupleId = *tuple;
       isTupleStatusBasicOpen = tuple->mTupleStatusBasic;
       contact = tuple->mTupleContact;
       tupleNote = tuple->mTupleNote;
   }
   else
   {
       tuple->remove(0);
       isTupleStatusBasicOpen = FALSE;
       contact = "";
       tupleNote = "";
   }

   return(tuple != NULL);
}

Best,
Amith
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to