[Shtoom] remove-DTMF.patch

zooko at zooko.com zooko at zooko.com
Wed Sep 28 05:00:20 CEST 2005


A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 700 bytes
Desc: remove-DTMF.patch.gz
URL: <http://mail.python.org/pipermail/shtoom/attachments/20050928/04514fa9/attachment.obj>
-------------- next part --------------
Tue Sep 27 23:58:32 ADT 2005  zooko at zooko.com
  * remove DTMF
  The big refactoring broke DTMF because it changed where PT bytes were stored.
  This patch removes the broken left-overs of DTMF.  Perhaps a patch that fixed
  DTMF would be preferable...
  
diff -rN -u old-tailor1406/shtoom/shtoom/rtp/protocol.py new-tailor1406/shtoom/shtoom/rtp/protocol.py
--- old-tailor1406/shtoom/shtoom/rtp/protocol.py	2005-09-27 23:59:41.127431504 -0300
+++ new-tailor1406/shtoom/shtoom/rtp/protocol.py	2005-09-27 23:59:41.255412048 -0300
@@ -312,13 +312,6 @@
         ts = ts & (2**32 - 1)
         return ts
 
-    def startDTMF(self, digit):
-        self._pendingDTMF.append(NTE(digit, self.ts))
-
-    def stopDTMF(self, digit):
-        if self._pendingDTMF[-1].getKey() == digit:
-            self._pendingDTMF[-1].end()
-
     def genRandom(self, bits):
         """Generate up to 128 bits of randomness."""
         if os.path.exists("/dev/urandom"):
@@ -352,13 +345,3 @@
         # Wrapping
         if self.ts >= TWO_TO_THE_32ND:
             self.ts = self.ts - TWO_TO_THE_32ND
-
-        # Now send any pending DTMF keystrokes
-        if self._pendingDTMF:
-            payload = self._pendingDTMF[0].getPayload(self.ts)
-            if payload:
-                ntept = self.ptdict.get(PT_NTE)
-                if ntept is not None:
-                    self._send_packet(pt=ntept, data=payload)
-                if self._pendingDTMF[0].isDone():
-                    self._pendingDTMF = self._pendingDTMF[1:]



More information about the Shtoom mailing list