diff --git a/apps/app_dial.c b/apps/app_dial.c index 89cf37521bea812a2699d0f854d9ba5f6fdc621d..f3e9ccfe685bd22dffa3255cc157b41a46fbee57 100755 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1013,15 +1013,15 @@ static int dial_exec(struct ast_channel *chan, void *data) ast_channel_sendurl( peer, url ); } /* /JDG */ if (announce && announcemsg) { - // Start autoservice on the other chan + /* Start autoservice on the other chan */ res = ast_autoservice_start(chan); - // Now Stream the File + /* Now Stream the File */ if (!res) res = ast_streamfile(peer,announcemsg,peer->language); if (!res) { digit = ast_waitstream(peer, AST_DIGIT_ANY); } - // Ok, done. stop autoservice + /* Ok, done. stop autoservice */ res = ast_autoservice_stop(chan); if (digit > 0 && !res) res = ast_senddigit(chan, digit); diff --git a/apps/app_festival.c b/apps/app_festival.c index 7b6f68634e94c7c3f61ff16775208d75fa8a2493..13eaa26b289a173add09db0a1234c81d8d447821 100755 --- a/apps/app_festival.c +++ b/apps/app_festival.c @@ -120,7 +120,7 @@ static int send_waveform_to_fd(char *waveform, int length, int fd) { if (x != fd) close(x); } -//IAS +/*IAS */ #ifdef __PPC__ for( x=0; x<length; x+=2) { @@ -216,7 +216,7 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in res = -1; break; } - if (res < needed) { // last frame + if (res < needed) { /* last frame */ ast_log(LOG_DEBUG, "Last frame\n"); res=0; break; @@ -231,8 +231,9 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in } close(fds[0]); close(fds[1]); -// if (pid > -1) -// kill(pid, SIGKILL); + +/* if (pid > -1) */ +/* kill(pid, SIGKILL); */ if (!res && owriteformat) ast_set_write_format(chan, owriteformat); return res; diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 637ebef83d92193afa6bbaf2b5f06eb18d474d82..df93d39b8b1d422fb31dd4816e21f8d9aafd9ef5 100755 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -799,7 +799,7 @@ zapretry: } } if (user->adminflags & ADMINFLAG_KICKME) { - //You have been kicked. + /* You have been kicked. */ if (!ast_streamfile(chan, "conf-kicked", chan->language)) ast_waitstream(chan, ""); ret = 0; diff --git a/apps/app_mp3.c b/apps/app_mp3.c index 0cd8dfa59c625813b1a0c164007125ac3255b8fa..e8f04c66250cf494af15fb2319d5cb41a469670c 100755 --- a/apps/app_mp3.c +++ b/apps/app_mp3.c @@ -38,8 +38,8 @@ static char *synopsis = "Play an MP3 file or stream"; static char *descrip = " MP3Player(location) Executes mpg123 to play the given location\n" -"which typically would be a filename or a URL. Returns -1 on\n" -"hangup or 0 otherwise. User can exit by pressing any key\n."; +"which typically would be a filename o a URL. User can exit by pressing any key\n." +"Returns -1 on hangup or 0 otherwise."; STANDARD_LOCAL_USER; diff --git a/apps/app_queue.c b/apps/app_queue.c index 4b7bae7115daad17f981c1361cad38521e29b810..f892915b7718aa5d6bb9fc24505cbf8223d75a88 100755 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -124,7 +124,7 @@ static char *descrip = " The timeout will cause the queue to fail out after a specified number of\n" "seconds, checked between each queues.conf 'timeout' and 'retry' cycle.\n"; -// [PHM 06/26/03] +/* PHM 06/26/03 */ static char *app_aqm = "AddQueueMember" ; static char *app_aqm_synopsis = "Dynamically adds queue members" ; static char *app_aqm_descrip = @@ -1506,7 +1506,7 @@ static int wait_a_bit(struct queue_ent *qe) return ast_waitfordigit(qe->chan, retrywait); } -// [PHM 06/26/03] +/* [PHM 06/26/03] */ static struct member * interface_exists( struct ast_call_queue * q, char * interface ) { @@ -1994,7 +1994,7 @@ static int queue_exec(struct ast_channel *chan, void *data) } } -// if (option_debug) +/* if (option_debug) */ ast_log(LOG_DEBUG, "queue: %s, options: %s, url: %s, announce: %s, timeout: %d, priority: %d\n", queuename, options, url, announceoverride, qe.queuetimeout, (int)prio); diff --git a/apps/app_sql_postgres.c b/apps/app_sql_postgres.c index 1620df6350b85edfb0189ade96344e96648c197e..f2e99dea4a531f6fbed13c638fb781271a1a95c4 100755 --- a/apps/app_sql_postgres.c +++ b/apps/app_sql_postgres.c @@ -226,7 +226,7 @@ static int aPGSQL_connect(struct ast_channel *chan, void *data) { s1=malloc(l); strncpy(s1, data, l -1); stringp=s1; - strsep(&stringp," "); // eat the first token, we already know it :P + strsep(&stringp," "); /* eat the first token, we already know it :P */ var=strsep(&stringp," "); optionstring=strsep(&stringp,"\n"); @@ -267,9 +267,9 @@ static int aPGSQL_query(struct ast_channel *chan, void *data) { s2=malloc(l); strncpy(s1, data, l - 1); stringp=s1; - strsep(&stringp," "); // eat the first token, we already know it :P + strsep(&stringp," "); /* eat the first token, we already know it :P */ s3=strsep(&stringp," "); - while (1) { // ugly trick to make branches with break; + while (1) { /* ugly trick to make branches with break; */ var=s3; s4=strsep(&stringp," "); id=atoi(s4); @@ -330,10 +330,10 @@ static int aPGSQL_fetch(struct ast_channel *chan, void *data) { s2=malloc(l); strncpy(s1, data, l - 1); stringp=s1; - strsep(&stringp," "); // eat the first token, we already know it :P + strsep(&stringp," "); /* eat the first token, we already know it :P */ fetchid_var=strsep(&stringp," "); - while (1) { // ugly trick to make branches with break; - var=fetchid_var; // fetchid + while (1) { /* ugly trick to make branches with break; */ + var=fetchid_var; /* fetchid */ fnd=0; AST_LIST_TRAVERSE(headp,variables,entries) { @@ -350,19 +350,19 @@ static int aPGSQL_fetch(struct ast_channel *chan, void *data) { } s4=strsep(&stringp," "); - id=atoi(s4); // resultid + id=atoi(s4); /* resultid */ if ((PGSQLres=find_identifier(id,AST_PGSQL_ID_RESID))==NULL) { ast_log(LOG_WARNING,"Invalid result identifier %d passed in aPGSQL_fetch\n",id); res=-1; break; } - id=atoi(s7); //fetchid + id=atoi(s7); /*fetchid */ if ((lalares=find_identifier(id,AST_PGSQL_ID_FETCHID))==NULL) { - i=0; // fetching the very first row + i=0; /* fetching the very first row */ } else { i=*lalares; free(lalares); - del_identifier(id,AST_PGSQL_ID_FETCHID); // will re-add it a bit later + del_identifier(id,AST_PGSQL_ID_FETCHID); /* will re-add it a bit later */ } if (i<PQntuples(PGSQLres)) { @@ -383,11 +383,11 @@ static int aPGSQL_fetch(struct ast_channel *chan, void *data) { pbx_builtin_setvar_helper(chan,s5,s6); } lalares=malloc(sizeof(int)); - *lalares = ++i; // advance to the next row + *lalares = ++i; /* advance to the next row */ id1 = add_identifier(AST_PGSQL_ID_FETCHID,lalares); } else { ast_log(LOG_WARNING,"ast_PGSQL_fetch : EOF\n"); - id1 = 0; // no more rows + id1 = 0; /* no more rows */ } snprintf(s, sizeof(s), "%d", id1); ast_log(LOG_WARNING,"Setting var '%s' to value '%s'\n",fetchid_var,s); @@ -413,7 +413,7 @@ static int aPGSQL_reset(struct ast_channel *chan, void *data) { s1=malloc(l); strncpy(s1, data, l - 1); stringp=s1; - strsep(&stringp," "); // eat the first token, we already know it :P + strsep(&stringp," "); /* eat the first token, we already know it :P */ s3=strsep(&stringp," "); id=atoi(s3); if ((karoto=find_identifier(id,AST_PGSQL_ID_CONNID))==NULL) { @@ -439,7 +439,7 @@ static int aPGSQL_clear(struct ast_channel *chan, void *data) { s1=malloc(l); strncpy(s1, data, l - 1); stringp=s1; - strsep(&stringp," "); // eat the first token, we already know it :P + strsep(&stringp," "); /* eat the first token, we already know it :P */ s3=strsep(&stringp," "); id=atoi(s3); if ((karoto=find_identifier(id,AST_PGSQL_ID_RESID))==NULL) { @@ -469,7 +469,7 @@ static int aPGSQL_disconnect(struct ast_channel *chan, void *data) { s1=malloc(l); strncpy(s1, data, l - 1); stringp=s1; - strsep(&stringp," "); // eat the first token, we already know it :P + strsep(&stringp," "); /* eat the first token, we already know it :P */ s3=strsep(&stringp," "); id=atoi(s3); if ((karoto=find_identifier(id,AST_PGSQL_ID_CONNID))==NULL) { diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 751cde0ff3a39b2c7764d705c60f26bd25f6198f..2a69862801ad386aa8a1c972365341bca7a9860b 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1299,7 +1299,7 @@ yuck: #else static int count_messages(char *dir) { - // Find all .txt files - even if they are not in sequence from 0000 + /* Find all .txt files - even if they are not in sequence from 0000 */ int vmcount = 0; DIR *vmdir = NULL; @@ -2214,12 +2214,10 @@ leave_vm_out: return res; } -#ifdef USE_ODBC_STORAGE -#endif static void resequence_mailbox(char * dir) { - // we know max messages, so stop process when number is hit + /* we know max messages, so stop process when number is hit */ int x,dest; char sfn[256]; diff --git a/cdr/cdr_csv.c b/cdr/cdr_csv.c index bd18a777533308bd3f736f956e7f8ce96599cd11..9de07f08694b73c49ce42843958c4b7cb47c137c 100755 --- a/cdr/cdr_csv.c +++ b/cdr/cdr_csv.c @@ -3,9 +3,9 @@ * * Comma Separated Value CDR records. * - * Copyright (C) 1999, Mark Spencer + * Copyright (C) 1999-2004, Digium, inc * - * Mark Spencer <markster@linux-support.net> + * Mark Spencer <markster@digium.com> * * This program is free software, distributed under the terms of * the GNU General Public License. @@ -39,32 +39,33 @@ #include <unistd.h> #include <time.h> -/* The values are as follows: +/*---------------------------------------------------- + The values are as follows: - "accountcode", // accountcode is the account name of detail records, Master.csv contains all records - // Detail records are configured on a channel basis, IAX and SIP are determined by user - // Zap is determined by channel in zaptel.conf + "accountcode", accountcode is the account name of detail records, Master.csv contains all records * + Detail records are configured on a channel basis, IAX and SIP are determined by user * + Zap is determined by channel in zaptel.conf "source", "destination", "destination context", "callerid", "channel", "destination channel", (if applicable) - "last application", // Last application run on the channel - "last app argument", // argument to the last channel + "last application", Last application run on the channel + "last app argument", argument to the last channel "start time", "answer time", "end time", - duration, // Duration is the whole length that the entire call lasted. ie. call rx'd to hangup - // "end time" minus "start time" - billable seconds, // the duration that a call was up after other end answered which will be <= to duration - // "end time" minus "answer time" - "disposition", // ANSWERED, NO ANSWER, BUSY - "amaflags", // DOCUMENTATION, BILL, IGNORE etc, specified on a per channel basis like accountcode. - "uniqueid", // unique call identifier - "userfield" // user field set via SetCDRUserField -*/ + duration, Duration is the whole length that the entire call lasted. ie. call rx'd to hangup + "end time" minus "start time" + billable seconds, the duration that a call was up after other end answered which will be <= to duration + "end time" minus "answer time" + "disposition", ANSWERED, NO ANSWER, BUSY + "amaflags", DOCUMENTATION, BILL, IGNORE etc, specified on a per channel basis like accountcode. + "uniqueid", unique call identifier + "userfield" user field set via SetCDRUserField +----------------------------------------------------------*/ static char *desc = "Comma Separated Values CDR Backend"; diff --git a/channels/chan_agent.c b/channels/chan_agent.c index c953ba389595764ba1b8e40c0d974e12e75ef15b..402c0949c7bcd8c1479f6329454a67632b46d0c6 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 d0eb84478aa04a447920d5747df9de42245f71c0..bfb566d4e83c786d0a62a7d8a966eb9f73676140 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 <creslin@linux-support.net> + * By Matthew Fredrickson <creslin@digium.com> * * 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 edc7293befab190be655598454293713a7faaf73..7eb4d1bdc2d84306e0d60c696a6c83f6f7da7a16 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 438aefacd6087c182c9e7db46c780963e29de325..e93eb04bac1b51d6227ee3a073ea9a66e07199fd 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 48e76aa6935f77835d92d2146e6d63fd7f43e3ca..0fbf5d49c9563286e3142b6d76f0b6228da610bb 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 dbf27977bba88fce5937d827770fb7686d3c5d5e..9a3fa486a36032d2f87d87da9e8c9260940d6a1b 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 : "<Unknown Caller>", 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(); diff --git a/codecs/codec_adpcm.c b/codecs/codec_adpcm.c index 2023588dc7faa29d305cbfae537aaf86c6844890..5da5d835df606766ba36c7327afdd3847198f377 100755 --- a/codecs/codec_adpcm.c +++ b/codecs/codec_adpcm.c @@ -5,9 +5,10 @@ * Based on frompcm.c and topcm.c from the Emiliano MIPL browser/ * interpreter. See http://www.bsdtelephony.com.mx * - * Copyright (c) 2001 Linux Support Services, Inc. All rights reserved. + * Copyright (c) 2001-2004 Digium, inc + * All rights reserved. * - * Karl Sackett <krs@linux-support.net>, 2001-3-21 + * Karl Sackett <krs@linux-support.net>, 2001-03-21 * * This program is free software, distributed under the terms of * the GNU General Public License diff --git a/codecs/codec_g726.c b/codecs/codec_g726.c index 9364b9ec63ac8b24dff5a495416924bc5240f8f6..1bcc23c483f287670cede6311de5ae4a199e6a1b 100755 --- a/codecs/codec_g726.c +++ b/codecs/codec_g726.c @@ -5,7 +5,7 @@ * Based on frompcm.c and topcm.c from the Emiliano MIPL browser/ * interpreter. See http://www.bsdtelephony.com.mx * - * Copyright (c) 2004, Digium + * Copyright (c) 2004, Digium, inc * * Mark Spencer <markster@digium.com> * diff --git a/codecs/codec_lpc10.c b/codecs/codec_lpc10.c index 9ec7a7ee207bfe6043885ef44af0d785373bcd4a..76b0eab7d7a986ef87b1f0490c231871563396f7 100755 --- a/codecs/codec_lpc10.c +++ b/codecs/codec_lpc10.c @@ -8,9 +8,9 @@ * * See http://www.arl.wustl.edu/~jaf/ * - * Copyright (C) 1999, Mark Spencer + * Copyright (C) 1999-2004 Digium,inc * - * Mark Spencer <markster@linux-support.net> + * Mark Spencer <markster@digium.com> * * This program is free software, distributed under the terms of * the GNU General Public License diff --git a/formats/format_g729.c b/formats/format_g729.c index 7c268996b32285486b454eed1bda811f91e29ea9..28acc92a93af19d6a97776967e1322948aebc2cf 100755 --- a/formats/format_g729.c +++ b/formats/format_g729.c @@ -187,7 +187,7 @@ static int g729_seek(struct ast_filestream *fs, long sample_offset, int whence) if (whence != SEEK_FORCECUR) { offset = (offset > max)?max:offset; } - // protect against seeking beyond begining. + /* protect against seeking beyond begining. */ offset = (offset < min)?min:offset; if (lseek(fs->fd, offset, SEEK_SET) < 0) return -1; diff --git a/formats/format_gsm.c b/formats/format_gsm.c index cb1a7ab0d384448e911e188821acbf1ebfddcda4..df1f9591a9ec79700cdfde2edf3e5019b72af3b0 100755 --- a/formats/format_gsm.c +++ b/formats/format_gsm.c @@ -3,9 +3,9 @@ * * Save to raw, headerless GSM data. * - * Copyright (C) 1999, Mark Spencer + * Copyright (C) 1999-2004, Digium, inc * - * Mark Spencer <markster@linux-support.net> + * Mark Spencer <markster@digium.com> * * This program is free software, distributed under the terms of * the GNU General Public License @@ -200,7 +200,7 @@ static int gsm_seek(struct ast_filestream *fs, long sample_offset, int whence) offset = distance + cur; else if(whence == SEEK_END) offset = max - distance; - // Always protect against seeking past the begining. + /* Always protect against seeking past the begining. */ offset = (offset < min)?min:offset; if (whence != SEEK_FORCECUR) { offset = (offset > max)?max:offset; diff --git a/formats/format_ilbc.c b/formats/format_ilbc.c index f92018cf25b5a466feddfe255f69471503709ca7..17a16dc2656c91947a182ce910159462f37018e9 100755 --- a/formats/format_ilbc.c +++ b/formats/format_ilbc.c @@ -5,9 +5,9 @@ * * Brian K. West <brian@bkw.org> * - * Copyright (C) 1999, Mark Spencer + * Copyright (C) 1999-2004, Digium, inc * - * Mark Spencer <markster@linux-support.net> + * Mark Spencer <markster@digium.com> * * This program is free software, distributed under the terms of * the GNU General Public License @@ -189,7 +189,7 @@ static int ilbc_seek(struct ast_filestream *fs, long sample_offset, int whence) if (whence != SEEK_FORCECUR) { offset = (offset > max)?max:offset; } - // protect against seeking beyond begining. + /* protect against seeking beyond begining. */ offset = (offset < min)?min:offset; if (lseek(fs->fd, offset, SEEK_SET) < 0) return -1; diff --git a/formats/format_sln.c b/formats/format_sln.c index 639905e01de8d82fd2ecc0afd6ba69f652be0ce9..d1826a366547cca909c58932fc60762ba9e68e09 100755 --- a/formats/format_sln.c +++ b/formats/format_sln.c @@ -175,7 +175,7 @@ static int slinear_seek(struct ast_filestream *fs, long sample_offset, int whenc if (whence != SEEK_FORCECUR) { offset = (offset > max)?max:offset; } - // always protect against seeking past begining. + /* always protect against seeking past begining. */ offset = (offset < min)?min:offset; return lseek(fs->fd, offset, SEEK_SET); } diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c index a34ae929da38807ee36779262abb757f8c1bfd7b..be85fa098546707c76d1ae3b32a12c3e48a358e6 100755 --- a/formats/format_wav_gsm.c +++ b/formats/format_wav_gsm.c @@ -501,7 +501,7 @@ static int wav_seek(struct ast_filestream *fs, long sample_offset, int whence) offset = distance + cur; else if(whence == SEEK_END) offset = max - distance; - // always protect against seeking past end of header + /* always protect against seeking past end of header */ offset = (offset < min)?min:offset; if (whence != SEEK_FORCECUR) { offset = (offset > max)?max:offset; diff --git a/utils/smsq.c b/utils/smsq.c index c256ff29c4eff932253266af70e2f2c0f4fa6fe1..0ae965ccc04e960945761ac461c88d2fa4cf5471 100755 --- a/utils/smsq.c +++ b/utils/smsq.c @@ -10,8 +10,8 @@ #include <unistd.h> #include <time.h> -// SMS queuing application for use with asterisk app_sms -// by Adrian Kennard, 2004 +/* SMS queuing application for use with asterisk app_sms */ +/* by Adrian Kennard, 2004 */ /* reads next USC character from null terminated UTF-8 string and advanced pointer */ /* for non valid UTF-8 sequences, returns character as is */ @@ -65,8 +65,8 @@ static int utf8decode (unsigned char **pp) return *p; /* not sensible */ } -// check for any queued messages in specific queue (queue="" means any queue) -// returns 0 if nothing queued, 1 if queued and outgoing set up OK, 2 of outgoing exists +/* check for any queued messages in specific queue (queue="" means any queue) */ +/* returns 0 if nothing queued, 1 if queued and outgoing set up OK, 2 of outgoing exists */ static char txqcheck (char *dir, char *queue, char subaddress, char *channel, char *callerid, int wait, int delay, int retries, int concurrent) { char ogname[100], @@ -90,7 +90,7 @@ static char txqcheck (char *dir, char *queue, char subaddress, char *channel, ch return 0; } if (!ql) - { // not searching any specific queue, so use whatr we found as the queue + { /* not searching any specific queue, so use whatr we found as the queue */ queue = fn->d_name; ql = p - queue; } @@ -150,18 +150,18 @@ static char txqcheck (char *dir, char *queue, char subaddress, char *channel, ch try++; snprintf(ogname, sizeof(ogname), "outgoing/smsq.%s.%s.%d", dir, queue, try); if (!link (temp, ogname)) - { // queued OK + { /* queued OK */ unlink (temp); return 1; } } } - // failed to create call queue + /* failed to create call queue */ unlink (temp); return 2; } -// Process received queue entries and run through a process, setting environment variables +/* Process received queue entries and run through a process, setting environment variables */ static void rxqcheck (char *dir, char *queue, char *process) { unsigned char *p; @@ -186,7 +186,7 @@ static void rxqcheck (char *dir, char *queue, char *process) FILE *f; snprintf (filename, sizeof(filename), "sms/%s/%s", dir, fn->d_name); if (rename (filename, temp)) - continue; // cannot access file + continue; /* cannot access file */ f = fopen (temp, "r"); unlink (temp); if (!f) @@ -229,7 +229,7 @@ static void rxqcheck (char *dir, char *queue, char *process) while (isspace (*p)) *p++ = 0; if (*p == '=') - { // = + { /* = */ *p++ = 0; if (!strcmp (line, "oa") || !strcmp (line, "da") || !strcmp (line, "scts") || !strcmp (line, "pid") || !strcmp (line, "dcs") || !strcmp (line, "mr") || !strcmp (line, "vp")) @@ -237,7 +237,7 @@ static void rxqcheck (char *dir, char *queue, char *process) else if ((!strcmp (line, "srr") || !strcmp (line, "rp")) && atoi (p)) setenv (line, "", 1); else if (!strcmp (line, "ud")) - { // read the user data as UTF-8 + { /* read the user data as UTF-8 */ long v; udl = 0; while ((v = utf8decode (&p)) && udl < 160) @@ -248,12 +248,12 @@ static void rxqcheck (char *dir, char *queue, char *process) { *p++ = 0; if (*p == '#') - { // ## + { /* ## */ p++; if (!strcmp (line, "udh")) setenv (line, p, 1); else if (!strcmp (line, "ud")) - { // read user data UCS-2 + { /* read user data UCS-2 */ udl = 0; while (*p && udl < 160) { @@ -269,9 +269,9 @@ static void rxqcheck (char *dir, char *queue, char *process) } } } else - { // # + { /* # */ if (!strcmp (line, "ud")) - { // read user data UCS-1 + { /* read user data UCS-1 */ udl = 0; while (*p && udl < 160) { @@ -287,7 +287,7 @@ static void rxqcheck (char *dir, char *queue, char *process) } } fclose (f); - // set up user data variables + /* set up user data variables */ { char temp[481]; int n, @@ -367,13 +367,13 @@ static void rxqcheck (char *dir, char *queue, char *process) } setenv ("ud16", temp, 1); } - // run the command + /* run the command */ system (process); } closedir (d); } -// Main app +/* Main app */ int main (int argc, const char *argv[]) { @@ -417,7 +417,7 @@ main (int argc, const char *argv[]) *defaultsubaddress = "9", subaddress = 0, *scts = 0; - poptContext optCon; // context for parsing command-line options + poptContext optCon; /* context for parsing command-line options */ const struct poptOption optionsTable[] = { {"queue", 'q', POPT_ARG_STRING | POPT_ARGFLAG_SHOW_DEFAULT, &queue, 0, "Queue [inc sub address]", "number[-X]"}, {"da", 'd', POPT_ARG_STRING, &da, 0, "Destination address", "number"}, @@ -485,7 +485,7 @@ main (int argc, const char *argv[]) fprintf (stderr, "Command line arguments always treated as UTF-8\n"); return 1; } - // if (!where && poptPeekArg (optCon)) where = (char *) poptGetArg (optCon); + /* if (!where && poptPeekArg (optCon)) where = (char *) poptGetArg (optCon); */ if (!mt && !mo && process) mt = 1; if (!mt && !mo && oa) @@ -585,7 +585,7 @@ main (int argc, const char *argv[]) return 1; } if (udfile) - { // get message from file + { /* get message from file */ unsigned char dat[1204], *p = dat, *e; @@ -642,14 +642,14 @@ main (int argc, const char *argv[]) } if (oa || da) - { // send message + { /* send message */ char temp[100], queuename[100], *dir = (mo ? rx ? "sms/morx" : "sms/motx" : rx ? "sms/mtrx" : "sms/mttx"); FILE *f; snprintf (temp, sizeof(temp), "sms/.smsq-%d", getpid ()); - mkdir ("sms", 0777); // ensure directory exists - mkdir (dir, 0777); // ensure directory exists + mkdir ("sms", 0777); /* ensure directory exists */ + mkdir (dir, 0777); /* ensure directory exists */ snprintf (queuename, sizeof(queuename), "%s/%s.%ld-%d", dir, *queue ? queue : "0", (long)time (0), getpid ()); f = fopen (temp, "w"); if (!f) @@ -713,7 +713,7 @@ main (int argc, const char *argv[]) } if (!nodial && tx && !process) - { // dial to send messages + { /* dial to send messages */ char ret=0, try = 3; if (nowait) @@ -725,7 +725,7 @@ main (int argc, const char *argv[]) else ret = txqcheck ("mttx", queue, subaddress, mttxchannel, mttxcallerid, mttxwait, mttxdelay, mttxretries, concurrent); if (ret < 2) - break; // sent, or queued OK + break; /* sent, or queued OK */ if (try) sleep (1); }