[asterisk-commits] russell: branch group/xcon_bfcp r67879 - in
/team/group/xcon_bfcp: ./ apps/ c...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Jun 6 15:16:26 MST 2007
Author: russell
Date: Wed Jun 6 17:16:24 2007
New Revision: 67879
URL: http://svn.digium.com/view/asterisk?view=rev&rev=67879
Log:
Merged revisions 67853,67863-67864,67875 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r67853 | russell | 2007-06-06 16:08:07 -0500 (Wed, 06 Jun 2007) | 2 lines
Constify the return values of ast_parking_ext() and ast_pickup_ext()
................
r67863 | russell | 2007-06-06 16:16:18 -0500 (Wed, 06 Jun 2007) | 12 lines
Merged revisions 67862 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67862 | russell | 2007-06-06 16:14:46 -0500 (Wed, 06 Jun 2007) | 4 lines
Fix a crash when doing call pickups with SIP phones. The code unlocked the
channel when it should not have.
(issue #9652, reported by corruptor, fixed by me)
........
................
r67864 | tilghman | 2007-06-06 16:20:11 -0500 (Wed, 06 Jun 2007) | 2 lines
Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
................
r67875 | russell | 2007-06-06 17:09:58 -0500 (Wed, 06 Jun 2007) | 14 lines
Merged revisions 67872 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67872 | russell | 2007-06-06 17:08:02 -0500 (Wed, 06 Jun 2007) | 6 lines
Disable reload functionality in res_snmp. It is not possible to initialize the
snmp library more than once without completely unloading the module and loading
it again.
(issue #9571, reported by hristo, additional helpful debug information from festr,
patch from me)
........
................
Modified:
team/group/xcon_bfcp/ (props changed)
team/group/xcon_bfcp/apps/app_adsiprog.c
team/group/xcon_bfcp/apps/app_alarmreceiver.c
team/group/xcon_bfcp/apps/app_dial.c
team/group/xcon_bfcp/apps/app_directory.c
team/group/xcon_bfcp/apps/app_externalivr.c
team/group/xcon_bfcp/apps/app_festival.c
team/group/xcon_bfcp/apps/app_followme.c
team/group/xcon_bfcp/apps/app_macro.c
team/group/xcon_bfcp/apps/app_meetme.c
team/group/xcon_bfcp/apps/app_milliwatt.c
team/group/xcon_bfcp/apps/app_minivm.c
team/group/xcon_bfcp/apps/app_mixmonitor.c
team/group/xcon_bfcp/apps/app_osplookup.c
team/group/xcon_bfcp/apps/app_queue.c
team/group/xcon_bfcp/apps/app_readfile.c
team/group/xcon_bfcp/apps/app_rpt.c
team/group/xcon_bfcp/apps/app_speech_utils.c
team/group/xcon_bfcp/apps/app_voicemail.c
team/group/xcon_bfcp/cdr/cdr_adaptive_odbc.c
team/group/xcon_bfcp/cdr/cdr_odbc.c
team/group/xcon_bfcp/cdr/cdr_pgsql.c
team/group/xcon_bfcp/cdr/cdr_sqlite.c
team/group/xcon_bfcp/cdr/cdr_tds.c
team/group/xcon_bfcp/channels/chan_agent.c
team/group/xcon_bfcp/channels/chan_gtalk.c
team/group/xcon_bfcp/channels/chan_iax2.c
team/group/xcon_bfcp/channels/chan_local.c
team/group/xcon_bfcp/channels/chan_mgcp.c
team/group/xcon_bfcp/channels/chan_misdn.c
team/group/xcon_bfcp/channels/chan_oss.c
team/group/xcon_bfcp/channels/chan_sip.c
team/group/xcon_bfcp/channels/chan_skinny.c
team/group/xcon_bfcp/channels/chan_vpb.cc
team/group/xcon_bfcp/channels/chan_zap.c
team/group/xcon_bfcp/channels/iax2-parser.c
team/group/xcon_bfcp/channels/iax2-provision.c
team/group/xcon_bfcp/channels/misdn_config.c
team/group/xcon_bfcp/codecs/codec_lpc10.c
team/group/xcon_bfcp/codecs/codec_zap.c
team/group/xcon_bfcp/funcs/func_callerid.c
team/group/xcon_bfcp/funcs/func_curl.c
team/group/xcon_bfcp/funcs/func_devstate.c
team/group/xcon_bfcp/funcs/func_enum.c
team/group/xcon_bfcp/funcs/func_odbc.c
team/group/xcon_bfcp/funcs/func_strings.c
team/group/xcon_bfcp/include/asterisk/features.h
team/group/xcon_bfcp/main/acl.c
team/group/xcon_bfcp/main/app.c
team/group/xcon_bfcp/main/asterisk.c
team/group/xcon_bfcp/main/autoservice.c
team/group/xcon_bfcp/main/callerid.c
team/group/xcon_bfcp/main/cdr.c
team/group/xcon_bfcp/main/channel.c
team/group/xcon_bfcp/main/chanvars.c
team/group/xcon_bfcp/main/cli.c
team/group/xcon_bfcp/main/config.c
team/group/xcon_bfcp/main/db.c
team/group/xcon_bfcp/main/devicestate.c
team/group/xcon_bfcp/main/dial.c
team/group/xcon_bfcp/main/dlfcn.c
team/group/xcon_bfcp/main/dnsmgr.c
team/group/xcon_bfcp/main/dsp.c
team/group/xcon_bfcp/main/enum.c
team/group/xcon_bfcp/main/event.c
team/group/xcon_bfcp/main/file.c
team/group/xcon_bfcp/main/fixedjitterbuf.c
team/group/xcon_bfcp/main/frame.c
team/group/xcon_bfcp/main/http.c
team/group/xcon_bfcp/main/indications.c
team/group/xcon_bfcp/main/io.c
team/group/xcon_bfcp/main/jitterbuf.c
team/group/xcon_bfcp/main/loader.c
team/group/xcon_bfcp/main/manager.c
team/group/xcon_bfcp/main/netsock.c
team/group/xcon_bfcp/main/pbx.c
team/group/xcon_bfcp/main/rtp.c
team/group/xcon_bfcp/main/say.c
team/group/xcon_bfcp/main/sched.c
team/group/xcon_bfcp/main/strcompat.c
team/group/xcon_bfcp/main/tdd.c
team/group/xcon_bfcp/main/threadstorage.c
team/group/xcon_bfcp/main/translate.c
team/group/xcon_bfcp/main/udptl.c
team/group/xcon_bfcp/main/utils.c
team/group/xcon_bfcp/res/res_agi.c
team/group/xcon_bfcp/res/res_config_pgsql.c
team/group/xcon_bfcp/res/res_config_sqlite.c
team/group/xcon_bfcp/res/res_features.c
team/group/xcon_bfcp/res/res_indications.c
team/group/xcon_bfcp/res/res_jabber.c
team/group/xcon_bfcp/res/res_monitor.c
team/group/xcon_bfcp/res/res_musiconhold.c
team/group/xcon_bfcp/res/res_odbc.c
team/group/xcon_bfcp/res/res_smdi.c
team/group/xcon_bfcp/res/res_snmp.c
team/group/xcon_bfcp/res/res_speech.c
Propchange: team/group/xcon_bfcp/
------------------------------------------------------------------------------
automerge = *
Propchange: team/group/xcon_bfcp/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/group/xcon_bfcp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jun 6 17:16:24 2007
@@ -1,1 +1,1 @@
-/trunk:1-67848
+/trunk:1-67878
Modified: team/group/xcon_bfcp/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_adsiprog.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_adsiprog.c (original)
+++ team/group/xcon_bfcp/apps/app_adsiprog.c Wed Jun 6 17:16:24 2007
@@ -1384,11 +1384,11 @@
break;
case STATE_INSUB:
ast_log(LOG_WARNING, "Missing ENDSUB at end of file %s\n", script);
- free(scr);
+ ast_free(scr);
return NULL;
case STATE_INKEY:
ast_log(LOG_WARNING, "Missing ENDKEY at end of file %s\n", script);
- free(scr);
+ ast_free(scr);
return NULL;
}
err = 0;
@@ -1414,7 +1414,7 @@
}
if (err) {
- free(scr);
+ ast_free(scr);
return NULL;
}
return scr;
@@ -1451,7 +1451,7 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User rejected download attempt\n");
ast_log(LOG_NOTICE, "User rejected download on channel %s\n", chan->name);
- free(scr);
+ ast_free(scr);
return -1;
}
@@ -1538,10 +1538,10 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Download attempt failed\n");
ast_log(LOG_NOTICE, "Download failed on %s\n", chan->name);
- free(scr);
+ ast_free(scr);
return -1;
}
- free(scr);
+ ast_free(scr);
ast_adsi_unload_session(chan);
return 0;
}
Modified: team/group/xcon_bfcp/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_alarmreceiver.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_alarmreceiver.c (original)
+++ team/group/xcon_bfcp/apps/app_alarmreceiver.c Wed Jun 6 17:16:24 2007
@@ -727,7 +727,7 @@
for(elp = event_head; (elp != NULL);){
efree = elp;
elp = elp->next;
- free(efree);
+ ast_free(efree);
}
Modified: team/group/xcon_bfcp/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_dial.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_dial.c (original)
+++ team/group/xcon_bfcp/apps/app_dial.c Wed Jun 6 17:16:24 2007
@@ -312,7 +312,7 @@
ast_hangup(outgoing->chan);
oo = outgoing;
outgoing=outgoing->next;
- free(oo);
+ ast_free(oo);
}
}
@@ -1327,7 +1327,7 @@
handle_cause(cause, &num);
if (!rest) /* we are on the last destination */
chan->hangupcause = cause;
- free(tmp);
+ ast_free(tmp);
continue;
}
pbx_builtin_setvar_helper(tc, "DIALEDPEERNUMBER", numsubst);
@@ -1374,7 +1374,7 @@
}
if (!tc) {
handle_cause(cause, &num);
- free(tmp);
+ ast_free(tmp);
continue;
}
}
@@ -1436,7 +1436,7 @@
ast_verbose(VERBOSE_PREFIX_3 "Couldn't call %s\n", numsubst);
ast_hangup(tc);
tc = NULL;
- free(tmp);
+ ast_free(tmp);
continue;
} else {
senddialevent(chan, tc);
Modified: team/group/xcon_bfcp/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_directory.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_directory.c (original)
+++ team/group/xcon_bfcp/apps/app_directory.c Wed Jun 6 17:16:24 2007
@@ -463,14 +463,14 @@
if (!strncmp(conv, ext, strlen(ext))) {
/* Match! */
found++;
- free(conv);
- free(start);
+ ast_free(conv);
+ ast_free(start);
break;
}
- free(conv);
+ ast_free(conv);
}
}
- free(start);
+ ast_free(start);
}
v = v->next;
}
@@ -547,10 +547,10 @@
default:
break;
}
- free(conv);
+ ast_free(conv);
break;
}
- free(conv);
+ ast_free(conv);
}
}
}
Modified: team/group/xcon_bfcp/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_externalivr.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_externalivr.c (original)
+++ team/group/xcon_bfcp/apps/app_externalivr.c Wed Jun 6 17:16:24 2007
@@ -136,7 +136,7 @@
struct gen_state *state = data;
gen_closestream(state);
- free(data);
+ ast_free(data);
}
/* caller has the playlist locked */
@@ -399,7 +399,7 @@
AST_LIST_LOCK(&u->finishlist);
while ((entry = AST_LIST_REMOVE_HEAD(&u->finishlist, list))) {
send_child_event(child_events, 'F', entry->filename, chan);
- free(entry);
+ ast_free(entry);
}
AST_LIST_UNLOCK(&u->finishlist);
}
@@ -422,7 +422,7 @@
AST_LIST_LOCK(&u->playlist);
while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) {
send_child_event(child_events, 'D', entry->filename, chan);
- free(entry);
+ ast_free(entry);
}
if (!u->playing_silence)
u->abort_current_sound = 1;
@@ -467,7 +467,7 @@
AST_LIST_LOCK(&u->playlist);
while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) {
send_child_event(child_events, 'D', entry->filename, chan);
- free(entry);
+ ast_free(entry);
}
if (!u->playing_silence)
u->abort_current_sound = 1;
@@ -569,7 +569,7 @@
close(child_stderr[1]);
while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list)))
- free(entry);
+ ast_free(entry);
ast_module_user_remove(lu);
Modified: team/group/xcon_bfcp/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_festival.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_festival.c (original)
+++ team/group/xcon_bfcp/apps/app_festival.c Wed Jun 6 17:16:24 2007
@@ -525,7 +525,7 @@
ast_log(LOG_DEBUG,"Festival WV command\n");
waveform = socket_receive_file_to_buff(fd,&filesize);
res = send_waveform_to_channel(chan,waveform,filesize, intstr);
- free(waveform);
+ ast_free(waveform);
break;
}
else if (strcmp(ack,"LP\n") == 0) { /* receive an s-expr */
@@ -534,7 +534,7 @@
waveform = socket_receive_file_to_buff(fd,&filesize);
waveform[filesize]='\0';
ast_log(LOG_WARNING,"Festival returned LP : %s\n",waveform);
- free(waveform);
+ ast_free(waveform);
} else if (strcmp(ack,"ER\n") == 0) { /* server got an error */
ast_log(LOG_WARNING,"Festival returned ER\n");
res=-1;
Modified: team/group/xcon_bfcp/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_followme.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_followme.c (original)
+++ team/group/xcon_bfcp/apps/app_followme.c Wed Jun 6 17:16:24 2007
@@ -172,17 +172,17 @@
while ((prev = AST_LIST_REMOVE_HEAD(&f->numbers, entry)))
/* Free the number */
- free(prev);
+ ast_free(prev);
AST_LIST_HEAD_INIT_NOLOCK(&f->numbers);
while ((prev = AST_LIST_REMOVE_HEAD(&f->blnumbers, entry)))
/* Free the blacklisted number */
- free(prev);
+ ast_free(prev);
AST_LIST_HEAD_INIT_NOLOCK(&f->blnumbers);
while ((prev = AST_LIST_REMOVE_HEAD(&f->wlnumbers, entry)))
/* Free the whitelisted number */
- free(prev);
+ ast_free(prev);
AST_LIST_HEAD_INIT_NOLOCK(&f->wlnumbers);
}
@@ -815,7 +815,7 @@
tmpuser = ast_calloc(1, sizeof(*tmpuser));
if (!tmpuser) {
ast_log(LOG_WARNING, "Out of memory!\n");
- free(findme_user_list);
+ ast_free(findme_user_list);
return;
}
@@ -872,7 +872,7 @@
if (!fmuser->cleared && fmuser->ochan != winner)
clear_caller(fmuser);
AST_LIST_REMOVE_CURRENT(findme_user_list, entry);
- free(fmuser);
+ ast_free(fmuser);
}
AST_LIST_TRAVERSE_SAFE_END
fmuser = NULL;
@@ -883,7 +883,7 @@
if (!caller) {
tpargs->status = 1;
- free(findme_user_list);
+ ast_free(findme_user_list);
return;
}
@@ -893,7 +893,7 @@
break;
}
- free(findme_user_list);
+ ast_free(findme_user_list);
if (!winner)
tpargs->status = 1;
else {
@@ -1012,7 +1012,7 @@
AST_LIST_TRAVERSE_SAFE_BEGIN(&targs.cnumbers, nm, entry) {
AST_LIST_REMOVE_CURRENT(&targs.cnumbers, entry);
- free(nm);
+ ast_free(nm);
}
AST_LIST_TRAVERSE_SAFE_END
@@ -1075,7 +1075,7 @@
AST_LIST_LOCK(&followmes);
while ((f = AST_LIST_REMOVE_HEAD(&followmes, entry))) {
free_numbers(f);
- free(f);
+ ast_free(f);
}
AST_LIST_UNLOCK(&followmes);
Modified: team/group/xcon_bfcp/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_macro.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_macro.c (original)
+++ team/group/xcon_bfcp/apps/app_macro.c Wed Jun 6 17:16:24 2007
@@ -422,7 +422,7 @@
if (oldargs[x]) {
if (!dead)
pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
- free(oldargs[x]);
+ ast_free(oldargs[x]);
} else if (!dead) {
pbx_builtin_setvar_helper(chan, varname, NULL);
}
@@ -435,11 +435,11 @@
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
}
if (save_macro_exten)
- free(save_macro_exten);
+ ast_free(save_macro_exten);
if (save_macro_context)
- free(save_macro_context);
+ ast_free(save_macro_context);
if (save_macro_priority)
- free(save_macro_priority);
+ ast_free(save_macro_priority);
if (!dead && setmacrocontext) {
chan->macrocontext[0] = '\0';
@@ -470,7 +470,7 @@
if (!dead)
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
if (save_macro_offset)
- free(save_macro_offset);
+ ast_free(save_macro_offset);
/* Unlock the macro */
if (exclusive) {
Modified: team/group/xcon_bfcp/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_meetme.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_meetme.c (original)
+++ team/group/xcon_bfcp/apps/app_meetme.c Wed Jun 6 17:16:24 2007
@@ -950,7 +950,7 @@
cnf->fd = open("/dev/zap/pseudo", O_RDWR);
if (cnf->fd < 0) {
ast_log(LOG_WARNING, "Unable to open pseudo device\n");
- free(cnf);
+ ast_free(cnf);
cnf = NULL;
goto cnfout;
}
@@ -965,7 +965,7 @@
ast_hangup(cnf->chan);
else
close(cnf->fd);
- free(cnf);
+ ast_free(cnf);
cnf = NULL;
goto cnfout;
}
@@ -2260,7 +2260,7 @@
else
close(conf->fd);
- free(conf);
+ ast_free(conf);
return 0;
}
@@ -3505,7 +3505,7 @@
}
/* Free all the queued video frames that may be waiting for this user */
- if(!AST_LIST_EMPTY(&user->videoframes)) {
+ if (!AST_LIST_EMPTY(&user->videoframes)) {
struct xcon_videoframe *vframe = NULL;
AST_LIST_TRAVERSE_SAFE_BEGIN(&user->videoframes, vframe, list)
ast_mutex_lock(&user->videoframe_lock);
@@ -3518,7 +3518,8 @@
}
}
- free(user);
+ ast_free(user);
+
AST_LIST_UNLOCK(&confs);
return ret;
@@ -6186,9 +6187,9 @@
sla_change_trunk_state(ringing_trunk->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
while ((station_ref = AST_LIST_REMOVE_HEAD(&ringing_trunk->timed_out_stations, entry)))
- free(station_ref);
-
- free(ringing_trunk);
+ ast_free(station_ref);
+
+ ast_free(ringing_trunk);
}
static void sla_stop_ringing_station(struct sla_ringing_station *ringing_station,
@@ -6223,7 +6224,7 @@
}
done:
- free(ringing_station);
+ ast_free(ringing_station);
}
static void sla_dial_state_callback(struct ast_dial *dial)
@@ -6334,8 +6335,8 @@
args.station = ringing_station->station;
args.cond = &cond;
args.cond_lock = &cond_lock;
- free(ringing_trunk);
- free(ringing_station);
+ ast_free(ringing_trunk);
+ ast_free(ringing_station);
ast_mutex_init(&cond_lock);
ast_cond_init(&cond, NULL);
ast_mutex_lock(&cond_lock);
@@ -6389,7 +6390,7 @@
continue;
if (ast_tvdiff_ms(ast_tvnow(), failed_station->last_try) > 1000) {
AST_LIST_REMOVE_CURRENT(&sla.failed_stations, entry);
- free(failed_station);
+ ast_free(failed_station);
break;
}
res = 1;
@@ -6424,12 +6425,12 @@
if (!sla.attempt_callerid && !ast_strlen_zero(ringing_trunk->trunk->chan->cid.cid_name)) {
cid_name = ast_strdupa(ringing_trunk->trunk->chan->cid.cid_name);
- free(ringing_trunk->trunk->chan->cid.cid_name);
+ ast_free(ringing_trunk->trunk->chan->cid.cid_name);
ringing_trunk->trunk->chan->cid.cid_name = NULL;
}
if (!sla.attempt_callerid && !ast_strlen_zero(ringing_trunk->trunk->chan->cid.cid_num)) {
cid_num = ast_strdupa(ringing_trunk->trunk->chan->cid.cid_num);
- free(ringing_trunk->trunk->chan->cid.cid_num);
+ ast_free(ringing_trunk->trunk->chan->cid.cid_num);
ringing_trunk->trunk->chan->cid.cid_num = NULL;
}
@@ -6591,7 +6592,7 @@
ast_dial_join(ringing_station->station->dial);
ast_dial_destroy(ringing_station->station->dial);
ringing_station->station->dial = NULL;
- free(ringing_station);
+ ast_free(ringing_station);
}
}
AST_LIST_TRAVERSE_SAFE_END
@@ -6856,7 +6857,7 @@
sla_handle_ringing_trunk_event();
break;
}
- free(event);
+ ast_free(event);
ast_mutex_lock(&sla.lock);
}
}
@@ -6864,10 +6865,10 @@
ast_mutex_unlock(&sla.lock);
while ((ringing_station = AST_LIST_REMOVE_HEAD(&sla.ringing_stations, entry)))
- free(ringing_station);
+ ast_free(ringing_station);
while ((failed_station = AST_LIST_REMOVE_HEAD(&sla.failed_stations, entry)))
- free(failed_station);
+ ast_free(failed_station);
return NULL;
}
@@ -6910,12 +6911,12 @@
if (!sla.attempt_callerid && !ast_strlen_zero(trunk_ref->chan->cid.cid_name)) {
cid_name = ast_strdupa(trunk_ref->chan->cid.cid_name);
- free(trunk_ref->chan->cid.cid_name);
+ ast_free(trunk_ref->chan->cid.cid_name);
trunk_ref->chan->cid.cid_name = NULL;
}
if (!sla.attempt_callerid && !ast_strlen_zero(trunk_ref->chan->cid.cid_num)) {
cid_num = ast_strdupa(trunk_ref->chan->cid.cid_num);
- free(trunk_ref->chan->cid.cid_num);
+ ast_free(trunk_ref->chan->cid.cid_num);
trunk_ref->chan->cid.cid_num = NULL;
}
@@ -7227,7 +7228,7 @@
ast_mutex_unlock(&sla.lock);
if (ringing_trunk) {
sla_change_trunk_state(ringing_trunk->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
- free(ringing_trunk);
+ ast_free(ringing_trunk);
pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "UNANSWERED");
/* Queue reprocessing of ringing trunks to make stations stop ringing
* that shouldn't be ringing after this trunk stopped. */
@@ -7295,10 +7296,10 @@
ast_context_remove_extension(trunk->autocontext, "s", 1, sla_registrar);
while ((station_ref = AST_LIST_REMOVE_HEAD(&trunk->stations, entry)))
- free(station_ref);
+ ast_free(station_ref);
ast_string_field_free_all(trunk);
- free(trunk);
+ ast_free(trunk);
}
static void destroy_station(struct sla_station *station)
@@ -7321,10 +7322,10 @@
}
while ((trunk_ref = AST_LIST_REMOVE_HEAD(&station->trunks, entry)))
- free(trunk_ref);
+ ast_free(trunk_ref);
ast_string_field_free_all(station);
- free(station);
+ ast_free(station);
}
static void sla_destroy(void)
@@ -7387,7 +7388,7 @@
if (!(trunk = ast_calloc(1, sizeof(*trunk))))
return -1;
if (ast_string_field_init(trunk, 32)) {
- free(trunk);
+ ast_free(trunk);
return -1;
}
@@ -7492,7 +7493,7 @@
}
if (!(station_ref = sla_create_station_ref(station))) {
- free(trunk_ref);
+ ast_free(trunk_ref);
return;
}
ast_atomic_fetchadd_int((int *) &trunk->num_stations, 1);
@@ -7516,7 +7517,7 @@
if (!(station = ast_calloc(1, sizeof(*station))))
return -1;
if (ast_string_field_init(station, 32)) {
- free(station);
+ ast_free(station);
return -1;
}
Modified: team/group/xcon_bfcp/apps/app_milliwatt.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_milliwatt.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_milliwatt.c (original)
+++ team/group/xcon_bfcp/apps/app_milliwatt.c Wed Jun 6 17:16:24 2007
@@ -59,7 +59,7 @@
static void milliwatt_release(struct ast_channel *chan, void *data)
{
- free(data);
+ ast_free(data);
return;
}
Modified: team/group/xcon_bfcp/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_minivm.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_minivm.c (original)
+++ team/group/xcon_bfcp/apps/app_minivm.c Wed Jun 6 17:16:24 2007
@@ -470,7 +470,7 @@
{
struct minivm_template *template;
- template = ast_calloc(1, sizeof(struct minivm_template));
+ template = ast_calloc(1, sizeof(*template));
if (!template)
return NULL;
@@ -488,9 +488,9 @@
static void message_template_free(struct minivm_template *template)
{
if (template->body)
- free(template->body);
-
- free (template);
+ ast_free(template->body);
+
+ ast_free (template);
}
/*! \brief Build message template from configuration */
@@ -524,7 +524,7 @@
ast_copy_string(template->charset, var->value, sizeof(template->charset));
} else if (!strcasecmp(var->name, "templatefile")) {
if (template->body)
- free(template->body);
+ ast_free(template->body);
template->body = message_template_parse_filebody(var->value);
if (!template->body) {
ast_log(LOG_ERROR, "Error reading message body definition file %s\n", var->value);
@@ -532,7 +532,7 @@
}
} else if (!strcasecmp(var->name, "messagebody")) {
if (template->body)
- free(template->body);
+ ast_free(template->body);
template->body = message_template_parse_emailbody(var->value);
if (!template->body) {
ast_log(LOG_ERROR, "Error parsing message body definition:\n %s\n", var->value);
@@ -727,7 +727,7 @@
{
if (vmu->chanvars)
ast_variables_destroy(vmu->chanvars);
- free(vmu);
+ ast_free(vmu);
}
@@ -793,7 +793,7 @@
{
struct minivm_account *new;
- new = calloc(1, sizeof(struct minivm_account));
+ new = ast_calloc(1, sizeof(*new));
if (!new)
return NULL;
populate_defaults(new);
@@ -808,7 +808,7 @@
struct minivm_account *this;
AST_LIST_LOCK(&minivm_accounts);
while ((this = AST_LIST_REMOVE_HEAD(&minivm_accounts, list)))
- free(this);
+ ast_free(this);
AST_LIST_UNLOCK(&minivm_accounts);
}
@@ -877,7 +877,7 @@
var = ast_load_realtime("minivm", "username", username, "domain", domain, NULL);
if (!var) {
- free(retval);
+ ast_free(retval);
return NULL;
}
@@ -2201,7 +2201,7 @@
ast_log(LOG_DEBUG, "Creating static account for user %s domain %s\n", username, domain);
/* Allocate user account */
- vmu = ast_calloc(1, sizeof(struct minivm_account));
+ vmu = ast_calloc(1, sizeof(*vmu));
if (!vmu)
return 0;
@@ -2277,7 +2277,7 @@
/*! \brief Free Mini Voicemail timezone */
static void free_zone(struct minivm_zone *z)
{
- free(z);
+ ast_free(z);
}
/*! \brief Clear list of timezones */
@@ -2299,21 +2299,21 @@
struct minivm_zone *newzone;
char *msg_format, *timezone;
- newzone = ast_calloc(1, sizeof(struct minivm_zone));
+ newzone = ast_calloc(1, sizeof(*newzone));
if (newzone == NULL)
return 0;
msg_format = ast_strdupa(config);
if (msg_format == NULL) {
ast_log(LOG_WARNING, "Out of memory.\n");
- free(newzone);
+ ast_free(newzone);
return 0;
}
timezone = strsep(&msg_format, "|");
if (!msg_format) {
ast_log(LOG_WARNING, "Invalid timezone definition : %s\n", zonename);
- free(newzone);
+ ast_free(newzone);
return 0;
}
Modified: team/group/xcon_bfcp/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_mixmonitor.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_mixmonitor.c (original)
+++ team/group/xcon_bfcp/apps/app_mixmonitor.c Wed Jun 6 17:16:24 2007
@@ -220,7 +220,7 @@
if (fs)
ast_closestream(fs);
- free(mixmonitor);
+ ast_free(mixmonitor);
return NULL;
@@ -253,7 +253,7 @@
}
/* Pre-allocate mixmonitor structure and spy */
- if (!(mixmonitor = calloc(1, len))) {
+ if (!(mixmonitor = ast_calloc(1, len))) {
return;
}
@@ -291,7 +291,7 @@
mixmonitor->spy.type, chan->name);
/* Since we couldn't add ourselves - bail out! */
ast_mutex_destroy(&mixmonitor->spy.lock);
- free(mixmonitor);
+ ast_free(mixmonitor);
return;
}
Modified: team/group/xcon_bfcp/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_osplookup.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_osplookup.c (original)
+++ team/group/xcon_bfcp/apps/app_osplookup.c Wed Jun 6 17:16:24 2007
@@ -328,7 +328,7 @@
error = OSPPUtilLoadPEMPrivateKey((unsigned char*)p->privatekey, &privatekey);
if (error != OSPC_ERR_NO_ERROR) {
ast_log(LOG_WARNING, "OSP: Unable to load privatekey '%s', error '%d'\n", p->privatekey, error);
- free(p);
+ ast_free(p);
return 0;
}
@@ -336,9 +336,9 @@
if (error != OSPC_ERR_NO_ERROR) {
ast_log(LOG_WARNING, "OSP: Unable to load localcert '%s', error '%d'\n", p->localcert, error);
if (privatekey.PrivateKeyData) {
- free(privatekey.PrivateKeyData);
- }
- free(p);
+ ast_free(privatekey.PrivateKeyData);
+ }
+ ast_free(p);
return 0;
}
@@ -354,16 +354,16 @@
ast_log(LOG_WARNING, "OSP: Unable to load cacert '%s', error '%d'\n", p->cacerts[i], error);
for (j = 0; j < i; j++) {
if (cacerts[j].CertData) {
- free(cacerts[j].CertData);
+ ast_free(cacerts[j].CertData);
}
}
if (localcert.CertData) {
- free(localcert.CertData);
+ ast_free(localcert.CertData);
}
if (privatekey.PrivateKeyData) {
- free(privatekey.PrivateKeyData);
- }
- free(p);
+ ast_free(privatekey.PrivateKeyData);
+ }
+ ast_free(p);
return 0;
}
pcacerts[i] = &cacerts[i];
@@ -394,7 +394,7 @@
&p->handle);
if (error != OSPC_ERR_NO_ERROR) {
ast_log(LOG_WARNING, "OSP: Unable to create provider '%s', error '%d'\n", provider, error);
- free(p);
+ ast_free(p);
res = -1;
} else {
if (option_debug)
@@ -408,14 +408,14 @@
for (i = 0; i < p->cacount; i++) {
if (cacerts[i].CertData) {
- free(cacerts[i].CertData);
+ ast_free(cacerts[i].CertData);
}
}
if (localcert.CertData) {
- free(localcert.CertData);
+ ast_free(localcert.CertData);
}
if (privatekey.PrivateKeyData) {
- free(privatekey.PrivateKeyData);
+ ast_free(privatekey.PrivateKeyData);
}
return res;
@@ -2009,7 +2009,7 @@
while(p) {
next = p->next;
OSPPProviderDelete(p->handle, 0);
- free(p);
+ ast_free(p);
p = next;
}
ospproviders = NULL;
Modified: team/group/xcon_bfcp/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_queue.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_queue.c (original)
+++ team/group/xcon_bfcp/apps/app_queue.c Wed Jun 6 17:16:24 2007
@@ -831,7 +831,7 @@
if (option_debug)
ast_log(LOG_DEBUG, "Removing %s from the list of interfaces that make up all of our queue members.\n", interface);
AST_LIST_REMOVE_CURRENT(&interfaces, list);
- free(curint);
+ ast_free(curint);
}
break;
}
@@ -848,7 +848,7 @@
AST_LIST_LOCK(&interfaces);
while ((curint = AST_LIST_REMOVE_HEAD(&interfaces, list)))
- free(curint);
+ ast_free(curint);
AST_LIST_UNLOCK(&interfaces);
}
@@ -1076,7 +1076,7 @@
else
q->members = next;
remove_from_interfaces(curm->interface);
- free(curm);
+ ast_free(curm);
} else
prev = curm;
}
@@ -1086,7 +1086,7 @@
{
free_members(q, 1);
ast_mutex_destroy(&q->lock);
- free(q);
+ ast_free(q);
}
/*!\brief Reload a single queue via realtime.
@@ -1196,7 +1196,7 @@
q->members = next_m;
}
remove_from_interfaces(m->interface);
- free(m);
+ ast_free(m);
} else {
prev_m = m;
}
@@ -1546,7 +1546,7 @@
ast_hangup(outgoing->chan);
oo = outgoing;
outgoing = outgoing->q_next;
- free(oo);
+ ast_free(oo);
}
}
@@ -1747,13 +1747,13 @@
tmp->chan->data = "(Outgoing Line)";
tmp->chan->whentohangup = 0;
if (tmp->chan->cid.cid_num)
- free(tmp->chan->cid.cid_num);
+ ast_free(tmp->chan->cid.cid_num);
tmp->chan->cid.cid_num = ast_strdup(qe->chan->cid.cid_num);
if (tmp->chan->cid.cid_name)
- free(tmp->chan->cid.cid_name);
+ ast_free(tmp->chan->cid.cid_name);
tmp->chan->cid.cid_name = ast_strdup(qe->chan->cid.cid_name);
if (tmp->chan->cid.cid_ani)
- free(tmp->chan->cid.cid_ani);
+ ast_free(tmp->chan->cid.cid_ani);
tmp->chan->cid.cid_ani = ast_strdup(qe->chan->cid.cid_ani);
/* Inherit specially named variables from parent channel */
@@ -2067,11 +2067,11 @@
} else {
ast_channel_inherit_variables(in, o->chan);
if (o->chan->cid.cid_num)
- free(o->chan->cid.cid_num);
+ ast_free(o->chan->cid.cid_num);
o->chan->cid.cid_num = ast_strdup(in->cid.cid_num);
if (o->chan->cid.cid_name)
- free(o->chan->cid.cid_name);
+ ast_free(o->chan->cid.cid_name);
o->chan->cid.cid_name = ast_strdup(in->cid.cid_name);
ast_string_field_set(o->chan, accountcode, in->accountcode);
@@ -2079,11 +2079,11 @@
if (in->cid.cid_ani) {
if (o->chan->cid.cid_ani)
- free(o->chan->cid.cid_ani);
+ ast_free(o->chan->cid.cid_ani);
o->chan->cid.cid_ani = ast_strdup(in->cid.cid_ani);
}
if (o->chan->cid.cid_rdnis)
- free(o->chan->cid.cid_rdnis);
+ ast_free(o->chan->cid.cid_rdnis);
o->chan->cid.cid_rdnis = ast_strdup(S_OR(in->macroexten, in->exten));
if (ast_call(o->chan, tmpchan, 0)) {
ast_log(LOG_NOTICE, "Failed to dial on local channel for call forward to '%s'\n", tmpchan);
@@ -2547,7 +2547,7 @@
if (outgoing->chan && (outgoing->chan->_state == AST_STATE_UP))
break;
} else {
- free(tmp);
+ ast_free(tmp);
}
}
if (qe->expire && (!qe->parent->timeout || (qe->expire - now) <= qe->parent->timeout))
@@ -2964,7 +2964,7 @@
"Location: %s\r\n"
"MemberName: %s\r\n",
q->name, last_member->interface, last_member->membername);
- free(last_member);
+ ast_free(last_member);
if (queue_persistent_members)
dump_queue_members(q);
@@ -4087,7 +4087,7 @@
} else {
q->members = newm;
}
- free(cur);
+ ast_free(cur);
} else {
/* Add them to the master int list if necessary */
add_to_interfaces(interface);
@@ -4116,7 +4116,7 @@
q->members = next;
remove_from_interfaces(cur->interface);
- free(cur);
+ ast_free(cur);
}
if (new) {
Modified: team/group/xcon_bfcp/apps/app_readfile.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_readfile.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_readfile.c (original)
+++ team/group/xcon_bfcp/apps/app_readfile.c Wed Jun 6 17:16:24 2007
@@ -94,7 +94,7 @@
ast_log(LOG_WARNING, "%s is longer than %d, and %d \n", file, len, (int)strlen(returnvar));
}
pbx_builtin_setvar_helper(chan, varname, returnvar);
- free(returnvar);
+ ast_free(returnvar);
}
ast_module_user_remove(u);
return res;
Modified: team/group/xcon_bfcp/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_rpt.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_rpt.c (original)
+++ team/group/xcon_bfcp/apps/app_rpt.c Wed Jun 6 17:16:24 2007
@@ -1353,7 +1353,7 @@
l = l->next;
continue;
}
- if ((s = (struct rpt_lstat *) ast_calloc(1, sizeof(struct rpt_lstat))) == NULL) {
+ if ((s = ast_calloc(1, sizeof(*s))) == NULL) {
ast_log(LOG_ERROR, "Malloc failed in rpt_do_lstats\n");
rpt_mutex_unlock(&myrpt->lock); /* UNLOCK */
return RESULT_FAILURE;
@@ -2186,7 +2186,7 @@
l = l->next;
continue;
}
- m = ast_malloc(sizeof(struct rpt_link));
+ m = ast_malloc(sizeof(*m));
if (!m) {
ast_log(LOG_WARNING, "Cannot alloc memory on %s\n", mychannel->name);
remque((struct qelem *)mytele);
@@ -2453,7 +2453,7 @@
struct rpt_link *mylink = (struct rpt_link *) data;
int res;
- tele = ast_calloc(1, sizeof(struct rpt_tele));
+ tele = ast_calloc(1, sizeof(*tele));
if (!tele) {
ast_log(LOG_WARNING, "Unable to allocate memory\n");
pthread_exit(NULL);
@@ -2869,7 +2869,7 @@
rpt_mutex_unlock(&myrpt->lock);
ast_copy_string(myrpt->lastlinknode, digitbuf, MAXNODESTR);
/* establish call in monitor mode */
- l = ast_calloc(1, sizeof(struct rpt_link));
+ l = ast_calloc(1, sizeof(*l));
if (!l) {
ast_log(LOG_WARNING, "Unable to malloc\n");
return DC_ERROR;
@@ -2979,7 +2979,7 @@
rpt_mutex_unlock(&myrpt->lock);
ast_copy_string(myrpt->lastlinknode, digitbuf, MAXNODESTR);
/* establish call in tranceive mode */
- l = ast_calloc(1, sizeof(struct rpt_link));
+ l = ast_calloc(1, sizeof(*l));
if (!l) {
ast_log(LOG_WARNING, "Unable to malloc\n");
return DC_ERROR;
@@ -6982,7 +6982,7 @@
} else
rpt_mutex_unlock(&myrpt->lock);
/* establish call in tranceive mode */
- l = ast_calloc(1, sizeof(struct rpt_link));
+ l = ast_calloc(1, sizeof(*l));
if (!l) {
ast_log(LOG_WARNING, "Unable to malloc\n");
pthread_exit(NULL);
Modified: team/group/xcon_bfcp/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_speech_utils.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_speech_utils.c (original)
+++ team/group/xcon_bfcp/apps/app_speech_utils.c Wed Jun 6 17:16:24 2007
@@ -511,7 +511,7 @@
}
if (speech->processing_sound != NULL) {
- free(speech->processing_sound);
+ ast_free(speech->processing_sound);
speech->processing_sound = NULL;
}
Modified: team/group/xcon_bfcp/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/apps/app_voicemail.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/apps/app_voicemail.c (original)
+++ team/group/xcon_bfcp/apps/app_voicemail.c Wed Jun 6 17:16:24 2007
@@ -793,7 +793,7 @@
ast_variables_destroy(var);
} else {
if (!ivm)
- free(retval);
+ ast_free(retval);
retval = NULL;
}
}
@@ -2287,12 +2287,12 @@
if (!ast_test_flag(vmu, VM_ALLOCED))
return;
- free(vmu);
+ ast_free(vmu);
}
static void free_zone(struct vm_zone *z)
{
- free(z);
+ ast_free(z);
}
static const char *mbox(int id)
@@ -8047,10 +8047,9 @@
AST_LIST_UNLOCK(&zones);
} else {
ast_log(LOG_WARNING, "Invalid timezone definition at line %d\n", var->lineno);
- free(z);
+ ast_free(z);
}
} else {
- free(z);
AST_LIST_UNLOCK(&users);
ast_config_destroy(cfg);
return -1;
@@ -8066,19 +8065,19 @@
memset(emailtitle,0,sizeof(emailtitle));
strcpy(charset, "ISO-8859-1");
if (emailbody) {
- free(emailbody);
+ ast_free(emailbody);
emailbody = NULL;
}
if (emailsubject) {
- free(emailsubject);
+ ast_free(emailsubject);
emailsubject = NULL;
}
if (pagerbody) {
- free(pagerbody);
+ ast_free(pagerbody);
pagerbody = NULL;
}
if (pagersubject) {
- free(pagersubject);
+ ast_free(pagersubject);
pagersubject = NULL;
}
if ((s = ast_variable_retrieve(cfg, "general", "pbxskip")))
@@ -8938,7 +8937,7 @@
ast_variables_destroy(var);
return vmu;
} else {
- free(vmu);
+ ast_free(vmu);
return NULL;
}
}
@@ -9320,7 +9319,7 @@
AST_LIST_UNLOCK(&vmstates);
if (vc)
- free(vc);
+ ast_free(vc);
else
ast_log(LOG_ERROR, "No vmstate found for user:%s, mailbox %s\n", vms->imapuser, vms->username);
}
Modified: team/group/xcon_bfcp/cdr/cdr_adaptive_odbc.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/cdr/cdr_adaptive_odbc.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/cdr/cdr_adaptive_odbc.c (original)
+++ team/group/xcon_bfcp/cdr/cdr_adaptive_odbc.c Wed Jun 6 17:16:24 2007
@@ -211,7 +211,7 @@
if (AST_LIST_FIRST(&(tableptr->columns)))
AST_RWLIST_INSERT_TAIL(&odbc_tables, tableptr, list);
else
- free(tableptr);
+ ast_free(tableptr);
}
return res;
}
Modified: team/group/xcon_bfcp/cdr/cdr_odbc.c
URL: http://svn.digium.com/view/asterisk/team/group/xcon_bfcp/cdr/cdr_odbc.c?view=diff&rev=67879&r1=67878&r2=67879
==============================================================================
--- team/group/xcon_bfcp/cdr/cdr_odbc.c (original)
+++ team/group/xcon_bfcp/cdr/cdr_odbc.c Wed Jun 6 17:16:24 2007
@@ -218,22 +218,22 @@
if (dsn) {
if (option_verbose > 10)
ast_verbose( VERBOSE_PREFIX_4 "cdr_odbc: free dsn\n");
[... 11300 lines stripped ...]
More information about the asterisk-commits
mailing list