< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

RE: [reSIProcate] Resiprocate:Memory Leak Question


There are known leaks with version 0.4.0 - try the SVN head.

-----Original Message-----
From: Seth, Ritesh [mailto:t_rseth@xxxxxxxxxxxx] 
Sent: Friday, July 16, 2004 5:42 PM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: [reSIProcate] Resiprocate:Memory Leak Question

Hi All,

I am using 0.4.0 version and running one of the test server. My test
Server is processing the INVITES and responding back with 200OK and
another 200 for BYE. 

When I look at the top the memory usage of the test server keeps
growing. Is this a memory leak or I need to free something. Attached is
the sample code of my testServer.

         while(calls > 0)

         {
            FdSet fdset;
            mStack.buildFdSet(fdset);
            int err = fdset.selectMilliSeconds(1);
            assert (err != -1);
            mStack.process(fdset);

            SipMessage* received = mStack.receive();
            if (received)
            {
               auto_ptr<SipMessage> forDel(received);
               MethodTypes meth =
received->header(h_RequestLine).getMethod();
               //ErrLog ( << "Server received: " << MethodNames[meth]);
               if ( meth == INVITE )
               {

                  Data localTag = Helper::computeTag(4);
                  auto_ptr<SipMessage>
msg180(Helper::makeResponse(*received, 180, contact));
                  msg180->header(h_To).param(p_tag) = localTag;
                  //ErrLog( << "Sent 180");
                  mStack.send( *msg180);



                  auto_ptr<SipMessage>
msg200(Helper::makeResponse(*received, 200, contact));
                  msg200->header(h_To).param(p_tag) = localTag;
                //ErrLog( << "Sent 200");
                 mStack.send(*msg200);
          
               }


               if ( meth == BYE)
               {
                  cout << "Bye Received" << endl;
                  auto_ptr<SipMessage>
msg200(Helper::makeResponse(*received, 200, contact));
                  calls--;
                  mStack.send(*msg200);
               }


            }
         }

Thanks for your help.

Ritesh
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel