aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-11 04:17:26 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-11 04:17:26 +0000
commit2c0f59a358bc5504bc7c07e86477be6657f566db (patch)
treed9cf0bd4150cd6f7487d9081f9eb76061c069089 /channels
parentc9a2adb3744d892ed771d4c3b9bd564a1764dd07 (diff)
Merged revisions 181135 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r181135 | jpeeler | 2009-03-10 23:06:44 -0500 (Tue, 10 Mar 2009) | 20 lines Fix malloc debug macros to work properly with h323. The main problem here was that cstdlib was undefining free thereby causing the proper debug macros to not be used. ast_h323.cxx has been changed to call ast_free instead to avoid the issue. A few other issues were addressed: - There were a few instances of functions improperly passing ast_free instead of ast_free_ptr. - Some clean up was done to avoid the debug macros intentionally being redefined. (copied below from Kevin's commit, appreciate the help) - disable astmm.h from doing anything when STANDALONE is defined, which is used by the tools in the utils/ directory that use parts of Asterisk header files in hackish ways; also ensure that utils/extconf.c and utils/conf2ael.c are compiled with STANDALONE defined. (closes issue #13593) Reported by: pj ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@181137 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c2
-rw-r--r--channels/h323/ast_h323.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 1bdb58506..8b8e6044e 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3523,7 +3523,7 @@ static void register_peer_exten(struct sip_peer *peer, int onoff)
if (onoff) {
if (!ast_exists_extension(NULL, context, ext, 1, NULL)) {
ast_add_extension(context, 1, ext, 1, NULL, NULL, "Noop",
- ast_strdup(peer->name), ast_free, "SIP");
+ ast_strdup(peer->name), ast_free_ptr, "SIP");
}
} else if (pbx_find_extension(NULL, NULL, &q, context, ext, 1, NULL, "", E_MATCH)) {
ast_context_remove_extension(context, ext, 1, NULL);
diff --git a/channels/h323/ast_h323.cxx b/channels/h323/ast_h323.cxx
index 222cbfb3c..e707c2c3b 100644
--- a/channels/h323/ast_h323.cxx
+++ b/channels/h323/ast_h323.cxx
@@ -137,7 +137,7 @@ int PAsteriskLog::Buffer::underflow()
int PAsteriskLog::Buffer::sync()
{
- char *str = strdup(string);
+ char *str = ast_strdup(string);
char *s, *s1;
char c;
@@ -153,7 +153,7 @@ int PAsteriskLog::Buffer::sync()
ast_verbose("%s", s);
*s1 = c;
}
- free(str);
+ ast_free(str);
string = PString();
char *base = string.GetPointer(2000);
@@ -2138,7 +2138,7 @@ MyH323_ExternalRTPChannel::MyH323_ExternalRTPChannel(MyH323Connection & connecti
/* tell the H.323 stack */
SetExternalAddress(H323TransportAddress(localIpAddr, localPort), H323TransportAddress(localIpAddr, localPort + 1));
/* clean up allocated memory */
- free(info);
+ ast_free(info);
}
/* Get the payload code */
@@ -2385,7 +2385,7 @@ int h323_set_alias(struct oh323_alias *alias)
endPoint->SetGateway();
}
if (prefix)
- free(prefix);
+ ast_free(prefix);
}
return 0;
}