[Asterisk-cvs] asterisk/channels chan_phone.c,1.46,1.47
markster at lists.digium.com
markster at lists.digium.com
Wed Mar 30 00:46:00 CST 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv13989/channels
Modified Files:
chan_phone.c
Log Message:
Add fixup to chan_phone (bug #3825)
Index: chan_phone.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_phone.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- chan_phone.c 28 Mar 2005 20:48:24 -0000 1.46
+++ chan_phone.c 30 Mar 2005 06:39:39 -0000 1.47
@@ -140,6 +140,7 @@
static int phone_write(struct ast_channel *ast, struct ast_frame *frame);
static struct ast_frame *phone_exception(struct ast_channel *ast);
static int phone_send_text(struct ast_channel *ast, const char *text);
+static int phone_fixup(struct ast_channel *old, struct ast_channel *new);
static const struct ast_channel_tech phone_tech = {
.type = type,
@@ -153,6 +154,7 @@
.read = phone_read,
.write = phone_write,
.exception = phone_exception,
+ .fixup = phone_fixup
};
static struct ast_channel_tech phone_tech_fxs = {
@@ -168,10 +170,19 @@
.exception = phone_exception,
.write_video = phone_write,
.send_text = phone_send_text,
+ .fixup = phone_fixup
};
static struct ast_channel_tech *cur_tech;
+static int phone_fixup(struct ast_channel *old, struct ast_channel *new)
+{
+ struct phone_pvt *pvt = old->tech_pvt;
+ if (pvt && pvt->owner == old)
+ pvt->owner = new;
+ return 0;
+}
+
static int phone_digit(struct ast_channel *ast, char digit)
{
struct phone_pvt *p;
More information about the svn-commits
mailing list