summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-06-21 23:52:40 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-06-21 23:52:40 +0000
commit7876ba00032d1117816414899497de867bf3eb31 (patch)
tree8726c2acbfe4e1d46f60b140e0f58e7f59249229
parent56270d3698dc53f439a7fc8f7c26c10b0d79bc0c (diff)
correct ZT_TONE_CALLWAIT for de and dk zones (bug #4519)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@680 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-xtonezone.c5
-rwxr-xr-xzaptel.c2
-rwxr-xr-xzonedata.c4
3 files changed, 7 insertions, 4 deletions
diff --git a/tonezone.c b/tonezone.c
index c0aa66d..c455919 100755
--- a/tonezone.c
+++ b/tonezone.c
@@ -123,7 +123,7 @@ static int build_tone(char *data, int size, struct tone_zone_sound *t, int *coun
return -1;
}
#if 0
- printf("Using %d samples for %d and %d\n", samples, freq1, freq2);
+ printf("Using %d samples for %d and %d\n", time * 8, freq1, freq2);
#endif
if (size < sizeof(struct zt_tone_def)) {
fprintf(stderr, "Not enough space for samples\n");
@@ -164,6 +164,9 @@ static int build_tone(char *data, int size, struct tone_zone_sound *t, int *coun
/* If we don't end on a solid tone, return */
td->next = firstnobang;
}
+ if (firstnobang < 0)
+ fprintf(stderr, "tone '%s' does not end with a solid tone or silence (all tone components have an exclamation mark)\n", t->data);
+
return used;
}
diff --git a/zaptel.c b/zaptel.c
index cc900dd..3d12c1c 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -2420,7 +2420,7 @@ ioctl_load_zone(unsigned long data)
next[x] = td.next;
/* Make sure the "next" one is sane */
if ((next[x] >= th.count) || (next[x] < 0)) {
- printk("Invalid 'next' pointer\n");
+ printk("Invalid 'next' pointer: %d\n", next[x]);
kfree(slab);
return -EINVAL;
}
diff --git a/zonedata.c b/zonedata.c
index 4ac47a9..5ee56ea 100755
--- a/zonedata.c
+++ b/zonedata.c
@@ -460,7 +460,7 @@ struct tone_zone builtin_zones[] =
{ ZT_TONE_BUSY, "425/480,0/480" },
{ ZT_TONE_RINGTONE, "425/1000,0/4000" },
{ ZT_TONE_CONGESTION, "425/240,0/240" },
- { ZT_TONE_CALLWAIT, "!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200" },
+ { ZT_TONE_CALLWAIT, "!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,0" },
/* DIALRECALL - not specified */
{ ZT_TONE_DIALRECALL, "!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425" },
/* RECORDTONE - not specified */
@@ -492,7 +492,7 @@ struct tone_zone builtin_zones[] =
{ ZT_TONE_BUSY, "425/500,0/500" },
{ ZT_TONE_RINGTONE, "425/1000,0/4000" },
{ ZT_TONE_CONGESTION, "425/200,0/200" },
- { ZT_TONE_CALLWAIT, "!425/200,!0/600,!425/200,!0/3000,!425/200,!0/200,!425/200" },
+ { ZT_TONE_CALLWAIT, "!425/200,!0/600,!425/200,!0/3000,!425/200,!0/200,!425/200,0" },
/* DIALRECALL - not specified */
{ ZT_TONE_DIALRECALL, "!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425" },
/* RECORDTONE - not specified */