[asterisk-dev] zaphfc with DAHDI
Timo Teräs
timo.teras at iki.fi
Thu Dec 11 01:27:52 CST 2008
Hi Tzafir,
I did a check out and a test try of svn://svn.debian.org/pkg-voip/dahdi-linux/trunk.
I noticed that zaphfc dahdi version is still broken there. The attached patch makes things work again for me.
Cheers,
Timo
Index: drivers/dahdi/zaphfc.h
===================================================================
--- drivers/dahdi/zaphfc.h (revision 6541)
+++ drivers/dahdi/zaphfc.h (working copy)
@@ -281,6 +281,7 @@
unsigned int usecount;
struct dahdi_span span;
struct dahdi_chan chans[3];
+ struct dahdi_chan *_chans[3];
struct hfc_card *card;
} dahdi_hfc;
Index: drivers/dahdi/zaphfc.c
===================================================================
--- drivers/dahdi/zaphfc.c (revision 6541)
+++ drivers/dahdi/zaphfc.c (working copy)
@@ -870,9 +870,11 @@
zthfc->span.close = zthfc_close;
zthfc->span.ioctl = zthfc_ioctl;
+ zthfc->span.channels = 3;
+ zthfc->span.chans = zthfc->_chans;
for (i = 0; i < zthfc->span.channels; i++)
- zthfc->span.chans[i] = &zthfc->chans[i];
- zthfc->span.channels = 3;
+ zthfc->_chans[i] = &zthfc->chans[i];
+
zthfc->span.deflaw = DAHDI_LAW_ALAW;
zthfc->span.linecompat = DAHDI_CONFIG_AMI | DAHDI_CONFIG_CCS; // <--- this is really BS
zthfc->span.offset = 0;
More information about the asterisk-dev
mailing list