~damg/ubuntu/quantal/asterisk/LP1097687

« back to all changes in this revision

Viewing changes to main/rtp.c

  • Committer: Bazaar Package Importer
  • Author(s): Lorenzo De Liso
  • Date: 2010-10-15 22:24:34 UTC
  • mfrom: (1.2.8 upstream) (8.3.8 sid)
  • Revision ID: james.westby@ubuntu.com-20101015222434-iy328q8in3lajzlv
Tags: 1:1.6.2.9-2ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control:
    + Build-depend on hardening-wrapper
    + Change Maintainer
    + Removed Uploaders field.
    + Removed Debian Vcs-Svn entry and replaced with ubuntu-voip Vcs-Bzr,
      to reflect divergence in packages.
  - debian/rules: Make use of hardening-wrapper
  - debian/asterisk.init: chown /dev/dahdi
  - debian/backports/hardy: add file
  - debian/backports/asterisk.init.hardy: add file
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
#include "asterisk.h"
30
30
 
31
 
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 254482 $")
 
31
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 264115 $")
32
32
 
33
33
#include <sys/time.h>
34
34
#include <signal.h>
992
992
                }
993
993
        } else if ((rtp->resp == resp) && !power) {
994
994
                f = create_dtmf_frame(rtp, AST_FRAME_DTMF_END);
995
 
                f->samples = rtp->dtmfsamples * (rtp_get_rate(f->subclass) / 1000);
 
995
                f->samples = rtp->dtmfsamples * (rtp->lastrxformat ? (rtp_get_rate(rtp->lastrxformat) / 1000) : 8);
996
996
                rtp->resp = 0;
997
997
        } else if (rtp->resp == resp)
998
 
                rtp->dtmfsamples += 20 * (rtp_get_rate(f->subclass) / 1000);
 
998
                rtp->dtmfsamples += 20 * (rtp->lastrxformat ? (rtp_get_rate(rtp->lastrxformat) / 1000) : 8);
999
999
        rtp->dtmf_timeout = dtmftimeout;
1000
1000
        return f;
1001
1001
}
4601
4601
        int port = 0;
4602
4602
        char *p, *arg;
4603
4603
 
4604
 
        arg = a->argv[3];
 
4604
        arg = a->argv[4];
4605
4605
        p = strstr(arg, ":");
4606
4606
        if (p) {
4607
4607
                *p = '\0';
4631
4631
        int port = 0;
4632
4632
        char *p, *arg;
4633
4633
 
4634
 
        arg = a->argv[3];
 
4634
        arg = a->argv[4];
4635
4635
        p = strstr(arg, ":");
4636
4636
        if (p) {
4637
4637
                *p = '\0';