summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-08-19 20:24:52 +0000
committersruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-08-19 20:24:52 +0000
commit33d80892c36a44b4919ce31a1c890b41ca6c82eb (patch)
tree5f9d95662b7416af649081ddf05fa75d15752d16
parentab2f7b36d75cbd447528e804888cd16053453ea1 (diff)
Fix bug where all transcoders are named tc400b0.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4492 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--kernel/wctc4xxp/base.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/kernel/wctc4xxp/base.c b/kernel/wctc4xxp/base.c
index 2cf24d7..88336ce 100644
--- a/kernel/wctc4xxp/base.c
+++ b/kernel/wctc4xxp/base.c
@@ -1744,6 +1744,10 @@ wctc4xxp_write(struct file *file, const char __user *frame, size_t count, loff_t
"%d bytes.\n", count, G723_5K_BYTES);
return -EINVAL;
}
+ cpvt->timestamp += G723_SAMPLES;
+ } else {
+ /* Same for ulaw and alaw */
+ cpvt->timestamp += G729_SAMPLES;
}
if (!(cmd = wctc4xxp_create_rtp_cmd(wc, dtc, count))) {
@@ -1756,7 +1760,6 @@ wctc4xxp_write(struct file *file, const char __user *frame, size_t count, loff_t
return -EFAULT;
}
cpvt->seqno += 1;
- cpvt->timestamp += count;
DTE_DEBUG(DTE_DEBUG_RTP_TX,
"Sending packet of %Zu byte on channel (%p).\n", count, dtc);
@@ -2867,13 +2870,16 @@ wctc4xxp_add_to_device_list(struct wcdte *wc)
list_for_each_entry(cur, &wctc4xxp_list, node) {
if (cur->pos != pos) {
/* Add the new entry before the one here */
- list_add_tail(&wc->node, &wctc4xxp_list);
+ list_add_tail(&wc->node, &cur->node);
break;
}
else {
++pos;
}
}
+ if (list_empty(&wc->node)) {
+ list_add_tail(&wc->node, &wctc4xxp_list);
+ }
spin_unlock(&wctc4xxp_list_lock);
return pos;
}
@@ -3237,13 +3243,6 @@ static struct pci_driver wctc4xxp_driver = {
int __init wctc4xxp_init(void)
{
int res;
-# ifndef CONFIG_WCDTE_NETWORK_IF
- if (debug & (DTE_DEBUG_NETWORK_IF|DTE_DEBUG_NETWORK_EARLY)) {
- printk(KERN_WARNING "%s: The Network interface was not compiled into the driver.\n", THIS_MODULE->name);
- debug &= ~(DTE_DEBUG_NETWORK_IF|DTE_DEBUG_NETWORK_EARLY);
- }
-# endif
-
# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
cmd_cache = kmem_cache_create(THIS_MODULE->name, sizeof(struct tcb), 0,
SLAB_HWCACHE_ALIGN, NULL, NULL);