[RTPproxy Devel] new command: x for deleting all active sessions

Daniel Pocock daniel at readytechnology.co.uk
Wed May 28 14:42:40 PDT 2008



Hi Maxim,

I've modified this code and committed it.

Can you please let me know if this is what you intended (using reply_ok 
and cookie).  I'll do each other change as a separate commit, so they 
can be reviewed separately.

Regards,

Daniel



===================================================================
RCS file: /cvsroot/ser/rtpproxy/rtpp_command.c,v
retrieving revision 1.6
diff -u -c -r1.6 rtpp_command.c
cvs server: conflicting specifications of output style
*** rtpp_command.c    3 Apr 2008 23:05:41 -0000    1.6
--- rtpp_command.c    28 May 2008 21:33:02 -0000
***************
*** 458,463 ****
--- 458,478 ----
      rname = "query";
      break;
 
+     case 'x':
+     case 'X':
+         /* Delete all active sessions */
+         rtpp_log_write(RTPP_LOG_WARN, glog, "deleting all active 
sessions...");
+         int counter = 0;
+         while(cf->nsessions > 0) {
+             if(cf->sessions[counter]->rtcp != NULL) {
+                 remove_session(cf, cf->sessions[counter]);
+         }
+            counter++;
+         }
+         reply_ok(cf, controlfd, &raddr, rlen, cookie);
+         return 0;
+         break;
+
      default:
      rtpp_log_write(RTPP_LOG_ERR, cf->glog, "unknown command");
      reply_error(cf, controlfd, &raddr, rlen, cookie, 3);


-- 


-----------------------------------------------------------------------
Ready Technology Limited
http://www.readytechnology.co.uk
Incorporated in England and Wales, 4940731
Registered office: Devonshire House, 60 Goswell Rd, London, EC1M 7AD
-----------------------------------------------------------------------



More information about the Devel mailing list