[asterisk-commits] russell: branch group/chan_unistim r88159 - /team/group/chan_unistim/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 1 15:45:12 CDT 2007


Author: russell
Date: Thu Nov  1 15:45:12 2007
New Revision: 88159

URL: http://svn.digium.com/view/asterisk?view=rev&rev=88159
Log:
get it to compile

Modified:
    team/group/chan_unistim/channels/chan_unistim.c

Modified: team/group/chan_unistim/channels/chan_unistim.c
URL: http://svn.digium.com/view/asterisk/team/group/chan_unistim/channels/chan_unistim.c?view=diff&rev=88159&r1=88158&r2=88159
==============================================================================
--- team/group/chan_unistim/channels/chan_unistim.c (original)
+++ team/group/chan_unistim/channels/chan_unistim.c Thu Nov  1 15:45:12 2007
@@ -4397,14 +4397,14 @@
 	if (!sub->parent)
 		ast_log(LOG_WARNING, "no line for subchannel %p\n", sub);
 	l = sub->parent;
-	tmp = ast_channel_alloc(1, state, l->cid_num, NULL, "%s-%08x", l->fullname, (int) (long) sub);  /* PJB */
+	tmp = ast_channel_alloc(1, state, l->cid_num, NULL, l->accountcode, l->exten, 
+		l->context, l->amaflags, "%s-%08x", l->fullname, (int) (long) sub);
 	if (unistimdebug)
 		ast_verbose("unistim_new sub=%d (%p) chan=%p\n", sub->subtype, sub, tmp);
 	if (!tmp) {
 		ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
 		return NULL;
 	}
-
 
 	tmp->nativeformats = l->capability;
 	if (!tmp->nativeformats)
@@ -4434,10 +4434,6 @@
 	tmp->tech = &unistim_tech;
 	if (!ast_strlen_zero(l->language))
 		ast_string_field_set(tmp, language, l->language);
-	if (!ast_strlen_zero(l->accountcode))
-		ast_string_field_set(tmp, accountcode, l->accountcode);
-	if (l->amaflags)
-		tmp->amaflags = l->amaflags;
 	sub->owner = tmp;
 	ast_mutex_lock(&usecnt_lock);
 	usecnt++;
@@ -4445,8 +4441,6 @@
 	ast_update_use_count();
 	tmp->callgroup = l->callgroup;
 	tmp->pickupgroup = l->pickupgroup;
-	ast_copy_string(tmp->context, l->context, sizeof(tmp->context));
-	ast_copy_string(tmp->exten, l->exten, sizeof(tmp->exten));
 	ast_string_field_set(tmp, call_forward, l->parent->call_forward);
 	if (!ast_strlen_zero(l->cid_num)) {
 		char *name, *loc, *instr;
@@ -5207,8 +5201,9 @@
 	struct unistim_device *d;
 	const int reuseFlag = 1;
 	struct unistimsession *s;
-
-	cfg = ast_config_load(config);
+	struct ast_flags config_flags = { 0, };
+
+	cfg = ast_config_load(config, config_flags);
 	/* We *must* have a config file otherwise stop immediately */
 	if (!cfg) {
 		ast_log(LOG_ERROR, "Unable to load config %s\n", config);
@@ -5425,17 +5420,19 @@
 	return res;
 }
 
-static int
-unistim_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struct ast_rtp *vrtp,
-					 int codecs, int nat_active)
+static int unistim_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, 
+	struct ast_rtp *vrtp, struct ast_rtp *trtp, int codecs, int nat_active)
 {
 	struct unistim_subchannel *sub;
+
 	if (unistimdebug)
 		ast_verbose("unistim_set_rtp_peer called\n");
+
 	sub = chan->tech_pvt;
-	if (sub) {
+
+	if (sub)
 		return 0;
-	}
+
 	return -1;
 }
 




More information about the asterisk-commits mailing list