[Asterisk-cvs] asterisk/channels chan_alsa.c,1.19,1.20 chan_h323.c,1.61,1.62 chan_iax2.c,1.158,1.159
markster at lists.digium.com
markster at lists.digium.com
Sat Jun 26 00:04:23 CDT 2004
- Previous message: [Asterisk-cvs] asterisk/channels/h323 ast_h323.cpp,1.51,1.52 ast_h323.h,1.23,1.24 chan_h323.h,1.21,1.22
- Next message: [Asterisk-cvs] asterisk/codecs/lpc10 analys.c,1.15,1.16 bsynz.c,1.14,1.15 chanwr.c,1.14,1.15 dcbias.c,1.14,1.15 decode.c,1.15,1.16 deemp.c,1.14,1.15 difmag.c,1.14,1.15 dyptrk.c,1.14,1.15 encode.c,1.14,1.15 energy.c,1.14,1.15 f2c.h,1.14,1.15 ham84.c,1.14,1.15 hp100.c,1.14,1.15 invert.c,1.14,1.15 irc2pc.c,1.14,1.15 ivfilt.c,1.15,1.16 lpcdec.c,1.14,1.15 lpcenc.c,1.14,1.15 lpfilt.c,1.14,1.15 median.c,1.14,1.15 mload.c,1.14,1.15 onset.c,1.14,1.15 pitsyn.c,1.15,1.16 placea.c,1.15,1.16 placev.c,1.14,1.15 preemp.c,1.14,1.15 prepro.c,1.14,1.15 random.c,1.14,1.15 rcchk.c,1.14,1.15 synths.c,1.15,1.16 tbdm.c,1.14,1.15 voicin.c,1.15,1.16 vparms.c,1.14,1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv14568/channels
Modified Files:
chan_alsa.c chan_h323.c chan_iax2.c
Log Message:
Merge source cleanups (bug #1911)
Index: chan_alsa.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_alsa.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- chan_alsa.c 24 Jun 2004 13:27:44 -0000 1.19
+++ chan_alsa.c 26 Jun 2004 03:50:14 -0000 1.20
@@ -78,6 +78,7 @@
static char text2send[80] = "";
AST_MUTEX_DEFINE_STATIC(usecnt_lock);
+AST_MUTEX_DEFINE_STATIC(alsalock);
static char *type = "Console";
static char *desc = "ALSA Console Channel Driver";
@@ -330,7 +331,9 @@
snd_pcm_uframes_t buffer_size = 0;
unsigned int rate = DESIRED_RATE;
+#if 0
unsigned int per_min = 1;
+#endif
//unsigned int per_max = 8;
snd_pcm_uframes_t start_threshold, stop_threshold;
Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_h323.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- chan_h323.c 22 Jun 2004 18:48:59 -0000 1.61
+++ chan_h323.c 26 Jun 2004 03:50:14 -0000 1.62
@@ -27,8 +27,29 @@
*/
+#include <sys/socket.h>
+#include <sys/signal.h>
+#include <sys/param.h>
+#if defined(BSD)
+#ifndef IPTOS_MINCOST
+#define IPTOS_MINCOST 0x02
+#endif
+#endif
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <netdb.h>
#include <stdio.h>
#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
#include <asterisk/lock.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
@@ -46,25 +67,23 @@
#include <asterisk/callerid.h>
#include <asterisk/cli.h>
#include <asterisk/dsp.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <netdb.h>
-#include <sys/signal.h>
-#include <sys/param.h>
-#if defined(BSD)
-#include <netinet/in_systm.h>
-#ifndef IPTOS_MINCOST
-#define IPTOS_MINCOST 0x02
-#endif
+#ifdef __cplusplus
+}
#endif
-#include <netinet/ip.h>
-
#include "h323/chan_h323.h"
+send_digit_cb on_send_digit;
+on_connection_cb on_create_connection;
+setup_incoming_cb on_incoming_call;
+setup_outbound_cb on_outgoing_call;
+start_logchan_cb on_start_logical_channel;
+chan_ringing_cb on_chan_ringing;
+con_established_cb on_connection_established;
+clear_con_cb on_connection_cleared;
+answer_call_cb on_answer_call;
+
+int h323debug;
+
/** String variables required by ASTERISK */
static char *type = "H323";
static char *desc = "The NuFone Network's Open H.323 Channel Driver";
@@ -322,7 +341,7 @@
ast_mutex_unlock(&peerl.lock);
} else {
ast_mutex_unlock(&peerl.lock);
- peer = malloc(sizeof(struct oh323_peer));
+ peer = (struct oh323_peer*)malloc(sizeof(struct oh323_peer));
memset(peer, 0, sizeof(struct oh323_peer));
}
if (peer) {
@@ -373,7 +392,7 @@
*/
static int oh323_digit(struct ast_channel *c, char digit)
{
- struct oh323_pvt *p = c->pvt->pvt;
+ struct oh323_pvt *p = (struct oh323_pvt *) c->pvt->pvt;
if (p && p->rtp && (p->dtmfmode & H323_DTMF_RFC2833)) {
ast_rtp_senddigit(p->rtp, digit);
}
@@ -393,7 +412,7 @@
static int oh323_call(struct ast_channel *c, char *dest, int timeout)
{
int res;
- struct oh323_pvt *p = c->pvt->pvt;
+ struct oh323_pvt *p = (struct oh323_pvt *) c->pvt->pvt;
char called_addr[256];
char *tmp, *cid, *cidname, oldcid[256];
@@ -480,7 +499,7 @@
{
int res;
- struct oh323_pvt *p = c->pvt->pvt;
+ struct oh323_pvt *p = (struct oh323_pvt *) c->pvt->pvt;
res = h323_answering_call(p->cd.call_token, 0);
@@ -492,7 +511,7 @@
static int oh323_hangup(struct ast_channel *c)
{
- struct oh323_pvt *p = c->pvt->pvt;
+ struct oh323_pvt *p = (struct oh323_pvt *) c->pvt->pvt;
int needcancel = 0;
if (h323debug)
ast_log(LOG_DEBUG, "oh323_hangup(%s)\n", c->name);
@@ -510,7 +529,7 @@
if (!c || (c->_state != AST_STATE_UP))
needcancel = 1;
/* Disconnect */
- p = c->pvt->pvt;
+ p = (struct oh323_pvt *) c->pvt->pvt;
/* Free dsp used for in-band DTMF detection */
if (p->vad) {
@@ -584,7 +603,7 @@
static struct ast_frame *oh323_read(struct ast_channel *c)
{
struct ast_frame *fr;
- struct oh323_pvt *p = c->pvt->pvt;
+ struct oh323_pvt *p = (struct oh323_pvt *) c->pvt->pvt;
ast_mutex_lock(&p->lock);
fr = oh323_rtp_read(p);
ast_mutex_unlock(&p->lock);
@@ -593,7 +612,7 @@
static int oh323_write(struct ast_channel *c, struct ast_frame *frame)
{
- struct oh323_pvt *p = c->pvt->pvt;
+ struct oh323_pvt *p = (struct oh323_pvt *) c->pvt->pvt;
int res = 0;
if (frame->frametype != AST_FRAME_VOICE) {
if (frame->frametype == AST_FRAME_IMAGE)
@@ -623,7 +642,7 @@
static int oh323_indicate(struct ast_channel *c, int condition)
{
- struct oh323_pvt *p = c->pvt->pvt;
+ struct oh323_pvt *p = (struct oh323_pvt *) c->pvt->pvt;
switch(condition) {
case AST_CONTROL_RINGING:
@@ -668,7 +687,7 @@
// FIXME: WTF is this? Do I need this???
static int oh323_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
{
- struct oh323_pvt *p = newchan->pvt->pvt;
+ struct oh323_pvt *p = (struct oh323_pvt *) newchan->pvt->pvt;
ast_mutex_lock(&p->lock);
if (p->owner != oldchan) {
@@ -755,7 +774,7 @@
{
struct oh323_pvt *p;
- p = malloc(sizeof(struct oh323_pvt));
+ p = (struct oh323_pvt *) malloc(sizeof(struct oh323_pvt));
if (!p) {
ast_log(LOG_ERROR, "Couldn't allocate private structure. This is bad\n");
return NULL;
@@ -796,7 +815,7 @@
p = iflist;
while(p) {
- if (p->cd.call_reference == call_reference) {
+ if ((signed int)p->cd.call_reference == call_reference) {
/* Found the call */
ast_mutex_unlock(&iflock);
return p;
@@ -814,7 +833,7 @@
int oldformat;
struct oh323_pvt *p;
struct ast_channel *tmpc = NULL;
- char *dest = data;
+ char *dest = (char *) data;
char *ext, *host;
char *h323id = NULL;
char tmp[256];
@@ -980,7 +999,7 @@
struct sockaddr_in them;
struct rtp_info *info;
- info = malloc(sizeof(struct rtp_info));
+ info = (struct rtp_info *) malloc(sizeof(struct rtp_info));
p = find_call(call_reference);
@@ -1769,7 +1788,7 @@
static struct ast_rtp *oh323_get_rtp_peer(struct ast_channel *chan)
{
struct oh323_pvt *p;
- p = chan->pvt->pvt;
+ p = (struct oh323_pvt *) chan->pvt->pvt;
if (p && p->rtp && p->bridge) {
return p->rtp;
}
@@ -1821,7 +1840,7 @@
return 0;
}
- p = chan->pvt->pvt;
+ p = (struct oh323_pvt *) chan->pvt->pvt;
if (!p) {
ast_log(LOG_ERROR, "No Private Structure, this is bad\n");
return -1;
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- chan_iax2.c 22 Jun 2004 18:49:00 -0000 1.158
+++ chan_iax2.c 26 Jun 2004 03:50:14 -0000 1.159
@@ -2722,7 +2722,7 @@
return ms;
}
-struct iax2_trunk_peer *find_tpeer(struct sockaddr_in *sin)
+static struct iax2_trunk_peer *find_tpeer(struct sockaddr_in *sin)
{
struct iax2_trunk_peer *tpeer;
/* Finds and locks trunk peer */
- Previous message: [Asterisk-cvs] asterisk/channels/h323 ast_h323.cpp,1.51,1.52 ast_h323.h,1.23,1.24 chan_h323.h,1.21,1.22
- Next message: [Asterisk-cvs] asterisk/codecs/lpc10 analys.c,1.15,1.16 bsynz.c,1.14,1.15 chanwr.c,1.14,1.15 dcbias.c,1.14,1.15 decode.c,1.15,1.16 deemp.c,1.14,1.15 difmag.c,1.14,1.15 dyptrk.c,1.14,1.15 encode.c,1.14,1.15 energy.c,1.14,1.15 f2c.h,1.14,1.15 ham84.c,1.14,1.15 hp100.c,1.14,1.15 invert.c,1.14,1.15 irc2pc.c,1.14,1.15 ivfilt.c,1.15,1.16 lpcdec.c,1.14,1.15 lpcenc.c,1.14,1.15 lpfilt.c,1.14,1.15 median.c,1.14,1.15 mload.c,1.14,1.15 onset.c,1.14,1.15 pitsyn.c,1.15,1.16 placea.c,1.15,1.16 placev.c,1.14,1.15 preemp.c,1.14,1.15 prepro.c,1.14,1.15 random.c,1.14,1.15 rcchk.c,1.14,1.15 synths.c,1.15,1.16 tbdm.c,1.14,1.15 voicin.c,1.15,1.16 vparms.c,1.14,1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list