From d6471bec319883d03b5e453b8116f32b4733b173 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Sun, 19 Dec 2004 21:13:41 +0000 Subject: Merge Olle's comment patch (bug #3097) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4488 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_agent.c | 2 +- channels/chan_alsa.c | 14 +++++++------- channels/chan_iax2.c | 12 ++++++------ channels/chan_mgcp.c | 22 +++++++++++----------- channels/chan_modem_i4l.c | 16 ++++++++-------- channels/chan_skinny.c | 6 +++--- 6 files changed, 36 insertions(+), 36 deletions(-) (limited to 'channels') diff --git a/channels/chan_agent.c b/channels/chan_agent.c index c953ba389..402c0949c 100755 --- a/channels/chan_agent.c +++ b/channels/chan_agent.c @@ -508,7 +508,7 @@ static int agent_call(struct ast_channel *ast, char *dest, int timeout) if (res) ast_log(LOG_WARNING, "Unable to set read format to %s\n", ast_getformatname(ast_best_codec(p->chan->nativeformats))); } else { - // Agent hung-up + /* Agent hung-up */ p->chan = NULL; } diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c index d0eb84478..bfb566d4e 100755 --- a/channels/chan_alsa.c +++ b/channels/chan_alsa.c @@ -1,9 +1,9 @@ /* * Asterisk -- A telephony toolkit for Linux. * - * Copyright (C) 2002, Linux Support Services + * Copyright (C) 2002-2004, Digium, inc * - * By Matthew Fredrickson + * By Matthew Fredrickson * * This program is free software, distributed under the terms of * the GNU General Public License @@ -61,7 +61,7 @@ #define MIN_SWITCH_TIME 600 static snd_pcm_format_t format = SND_PCM_FORMAT_S16_LE; -//static int block = O_NONBLOCK; +/* static int block = O_NONBLOCK; */ static char indevname[50] = ALSA_INDEV; static char outdevname[50] = ALSA_OUTDEV; @@ -284,14 +284,14 @@ static snd_pcm_t *alsa_card_init(char *dev, snd_pcm_stream_t stream) snd_pcm_sw_params_t *swparams = NULL; struct pollfd pfd; snd_pcm_uframes_t period_size = PERIOD_FRAMES * 4; - //int period_bytes = 0; + /* int period_bytes = 0; */ 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; + /* unsigned int per_max = 8; */ snd_pcm_uframes_t start_threshold, stop_threshold; err = snd_pcm_open(&handle, dev, stream, O_NONBLOCK); @@ -334,7 +334,7 @@ static snd_pcm_t *alsa_card_init(char *dev, snd_pcm_stream_t stream) ast_log(LOG_DEBUG, "Period size is %d\n", err); } - buffer_size = 4096 * 2; //period_size * 16; + buffer_size = 4096 * 2; /* period_size * 16; */ err = snd_pcm_hw_params_set_buffer_size_near(handle, hwparams, &buffer_size); if (err < 0) { ast_log(LOG_WARNING, "Problem setting buffer size of %ld: %s\n", buffer_size, snd_strerror(err)); @@ -542,7 +542,7 @@ static int alsa_write(struct ast_channel *chan, struct ast_frame *f) int len = sizpos; int pos; int res = 0; - //size_t frames = 0; + /* size_t frames = 0; */ snd_pcm_state_t state; /* Immediately return if no sound is enabled */ if (nosound) diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index edc7293be..7eb4d1bdc 100755 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -6617,8 +6617,8 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, in } } else if (!strcasecmp(v->name, "timezone")) { strncpy(peer->zonetag, v->value, sizeof(peer->zonetag)-1); - }// else if (strcasecmp(v->name,"type")) - // ast_log(LOG_WARNING, "Ignoring %s\n", v->name); + }/* else if (strcasecmp(v->name,"type")) */ + /* ast_log(LOG_WARNING, "Ignoring %s\n", v->name); */ v=v->next; } if (!peer->authmethods) @@ -6755,8 +6755,8 @@ static struct iax2_user *build_user(const char *name, struct ast_variable *v, in } } else if (!strcasecmp(v->name, "inkeys")) { strncpy(user->inkeys, v->value, sizeof(user->inkeys) - 1); - }// else if (strcasecmp(v->name,"type")) - // ast_log(LOG_WARNING, "Ignoring %s\n", v->name); + }/* else if (strcasecmp(v->name,"type")) */ + /* ast_log(LOG_WARNING, "Ignoring %s\n", v->name); */ v = v->next; } if (!user->authmethods) { @@ -7038,8 +7038,8 @@ static int set_config(char *config_file, struct sockaddr_in* sin){ } } else if (!strcasecmp(v->name, "language")) { strncpy(language, v->value, sizeof(language) - 1); - } //else if (strcasecmp(v->name,"type")) - // ast_log(LOG_WARNING, "Ignoring %s\n", v->name); + } /*else if (strcasecmp(v->name,"type")) */ + /* ast_log(LOG_WARNING, "Ignoring %s\n", v->name); */ v = v->next; } iax2_capability = capability; diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 438aefacd..e93eb04ba 100755 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -1019,7 +1019,7 @@ static int mgcp_show_endpoints(int fd, int argc, char *argv[]) e = g->endpoints; ast_cli(fd, "Gateway '%s' at %s (%s)\n", g->name, g->addr.sin_addr.s_addr ? ast_inet_ntoa(iabuf, sizeof(iabuf), g->addr.sin_addr) : ast_inet_ntoa(iabuf, sizeof(iabuf), g->defaddr.sin_addr), g->dynamic ? "Dynamic" : "Static"); while(e) { - // JS: Don't show wilcard endpoint + /* JS: Don't show wilcard endpoint */ if (strcmp(e->name, g->wcardep) !=0) ast_cli(fd, " -- '%s@%s in '%s' is %s\n", e->name, g->name, e->context, e->sub->owner ? "active" : "idle"); hasendpoints = 1; @@ -1721,7 +1721,7 @@ static int process_sdp(struct mgcp_subchannel *sub, struct mgcp_request *req) #if 0 printf("Peer RTP is at port %s:%d\n", ast_inet_ntoa(iabuf, sizeof(iabuf), sin.sin_addr), ntohs(sin.sin_port)); #endif - // Scan through the RTP payload types specified in a "m=" line: + /* Scan through the RTP payload types specified in a "m=" line: */ ast_rtp_pt_clear(sub->rtp); codecs = m + len; while(strlen(codecs)) { @@ -1733,18 +1733,18 @@ static int process_sdp(struct mgcp_subchannel *sub, struct mgcp_request *req) codecs += len; } - // Next, scan through each "a=rtpmap:" line, noting each - // specified RTP payload type (with corresponding MIME subtype): + /* Next, scan through each "a=rtpmap:" line, noting each */ + /* specified RTP payload type (with corresponding MIME subtype): */ sdpLineNum_iterator_init(&iterator); while ((a = get_sdp_iterate(&iterator, req, "a"))[0] != '\0') { - char* mimeSubtype = strdup(a); // ensures we have enough space + char* mimeSubtype = strdup(a); /* ensures we have enough space */ if (sscanf(a, "rtpmap: %u %[^/]/", &codec, mimeSubtype) != 2) continue; - // Note: should really look at the 'freq' and '#chans' params too + /* Note: should really look at the 'freq' and '#chans' params too */ ast_rtp_set_rtpmap_type(sub->rtp, codec, "audio", mimeSubtype); free(mimeSubtype); } - // Now gather all of the codecs that were asked for: + /* Now gather all of the codecs that were asked for: */ ast_rtp_get_current_formats(sub->rtp, &peercapability, &peerNonCodecCapability); p->capability = capability & peercapability; @@ -2167,7 +2167,7 @@ static int transmit_audit_endpoint(struct mgcp_endpoint *p) struct mgcp_request resp; reqprep(&resp, p, "AUEP"); /* SC: removed unknown param VS */ - //add_header(&resp, "F", "A,R,D,S,X,N,I,T,O,ES,E,MD,M"); + /*add_header(&resp, "F", "A,R,D,S,X,N,I,T,O,ES,E,MD,M"); */ add_header(&resp, "F", "A"); /* SC: fill in new fields */ resp.cmd = MGCP_CMD_AUEP; @@ -2923,7 +2923,7 @@ static int handle_request(struct mgcp_subchannel *sub, struct mgcp_request *req, if (option_verbose > 2 && (strcmp(p->name, p->parent->wcardep) != 0)) { ast_verbose(VERBOSE_PREFIX_3 "Resetting interface %s@%s\n", p->name, p->parent->name); } - // JS: For RSIP on wildcard we reset all endpoints + /* JS: For RSIP on wildcard we reset all endpoints */ if (!strcmp(p->name, p->parent->wcardep)) { /* Reset all endpoints */ struct mgcp_endpoint *tmp_ep; @@ -2931,7 +2931,7 @@ static int handle_request(struct mgcp_subchannel *sub, struct mgcp_request *req, g = p->parent; tmp_ep = g->endpoints; while (tmp_ep) { - //if ((strcmp(tmp_ep->name, "*") != 0) && (strcmp(tmp_ep->name, "aaln/*") != 0)) { + /*if ((strcmp(tmp_ep->name, "*") != 0) && (strcmp(tmp_ep->name, "aaln/*") != 0)) { */ if (strcmp(tmp_ep->name, g->wcardep) != 0) { struct mgcp_subchannel *tmp_sub, *first_sub; if (option_verbose > 2) { @@ -3635,7 +3635,7 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v) e->needaudit = 1; } strncpy(gw->wcardep, v->value, sizeof(gw->wcardep)-1); - //strncpy(e->name, "aaln/*", sizeof(e->name) - 1); + /*strncpy(e->name, "aaln/*", sizeof(e->name) - 1); */ /* XXX Should we really check for uniqueness?? XXX */ strncpy(e->context, context, sizeof(e->context) - 1); strncpy(e->cid_num, cid_num, sizeof(e->cid_num) - 1); diff --git a/channels/chan_modem_i4l.c b/channels/chan_modem_i4l.c index 48e76aa69..0fbf5d49c 100755 --- a/channels/chan_modem_i4l.c +++ b/channels/chan_modem_i4l.c @@ -172,8 +172,8 @@ static int i4l_init(struct ast_modem_pvt *p) if (strlen(p->incomingmsn)) { char *q; snprintf(cmd, sizeof(cmd), "AT&L%s", p->incomingmsn); - // translate , into ; since that is the seperator I4L uses, but can't be directly - // put in the config file because it will interpret the rest of the line as comment. + /* translate , into ; since that is the seperator I4L uses, but can't be directly */ + /* put in the config file because it will interpret the rest of the line as comment. */ q = cmd+4; while (*q) { if (*q == ',') *q = ';'; @@ -319,9 +319,9 @@ static struct ast_frame *i4l_read(struct ast_modem_pvt *p) /* Read the first two bytes, first, in case it's a control message */ res = read(p->fd, result, 2); if (res < 2) { - // short read, means there was a hangup? - // (or is this also possible without hangup?) - // Anyway, reading from unitialized buffers is a bad idea anytime. + /* short read, means there was a hangup? */ + /* (or is this also possible without hangup?) */ + /* Anyway, reading from unitialized buffers is a bad idea anytime. */ if (errno == EAGAIN) return i4l_handle_escape(p, 0); return NULL; @@ -337,7 +337,7 @@ static struct ast_frame *i4l_read(struct ast_modem_pvt *p) ast_modem_trim(result); if (!strcasecmp(result, "VCON")) { /* If we're in immediate mode, reply now */ -// if (p->mode == MODEM_MODE_IMMEDIATE) +/* if (p->mode == MODEM_MODE_IMMEDIATE) */ return i4l_handle_escape(p, 'X'); } else if (!strcasecmp(result, "BUSY")) { @@ -587,11 +587,11 @@ static int i4l_dial(struct ast_modem_pvt *p, char *stuff) char tmpmsn[255]; struct ast_channel *c = p->owner; - // Find callerid number first, to set the correct A number + /* Find callerid number first, to set the correct A number */ if (c && c->cid.cid_num && !(c->cid.cid_pres & 0x20)) { snprintf(tmpmsn, sizeof(tmpmsn), ",%s,", c->cid.cid_num); if(strlen(p->outgoingmsn) && strstr(p->outgoingmsn,tmpmsn) != NULL) { - // Tell ISDN4Linux to use this as A number + /* Tell ISDN4Linux to use this as A number */ snprintf(cmd, sizeof(cmd), "AT&E%s\n", c->cid.cid_num); if (ast_modem_send(p, cmd, strlen(cmd))) { ast_log(LOG_WARNING, "Unable to set A number to %s\n", c->cid.cid_num); diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index dbf27977b..9a3fa486a 100755 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -3,7 +3,7 @@ * * Implementation of the Skinny protocol * - * Asterisk is Copyright (C) 1999-2003 Mark Spencer + * Copyright (C) 1999-2004 Digium, inc * * chan_skinny was developed by Jeremy McNamara & Florian Overkamp * @@ -1449,7 +1449,7 @@ static void *skinny_ss(void *data) ((exten[0] != '*') || (!ast_strlen_zero(exten) > 2))) { ast_log(LOG_WARNING, "Can't match [%s] from '%s' in context %s\n", exten, chan->cid.cid_num ? chan->cid.cid_num : "", chan->context); transmit_tone(s, SKINNY_REORDER); - sleep(3); // hang out for 3 seconds to let congestion play + sleep(3); /* hang out for 3 seconds to let congestion play */ break; } if (!timeout) @@ -2716,7 +2716,7 @@ void delete_devices(void) int reload(void) { #if 0 -// XXX Causes Seg +/* XXX Causes Seg - needs to be fixed, or? */ delete_devices(); reload_config(); -- cgit v1.2.3