there is no need for __iax_frame_free ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
e553725500
commit
7dfc749551
|
@ -973,7 +973,7 @@ struct iax_frame *iax_frame_new(int direction, int datalen)
|
||||||
return fr;
|
return fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __iax_frame_free(struct iax_frame *fr, int cache)
|
void iax_frame_free(struct iax_frame *fr)
|
||||||
{
|
{
|
||||||
struct iax_frames *iax_frames;
|
struct iax_frames *iax_frames;
|
||||||
|
|
||||||
|
@ -988,10 +988,6 @@ static void __iax_frame_free(struct iax_frame *fr, int cache)
|
||||||
}
|
}
|
||||||
fr->direction = 0;
|
fr->direction = 0;
|
||||||
ast_atomic_fetchadd_int(&frames, -1);
|
ast_atomic_fetchadd_int(&frames, -1);
|
||||||
if (!cache) {
|
|
||||||
free(fr);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(iax_frames = ast_threadstorage_get(&frame_cache, sizeof(*iax_frames)))) {
|
if (!(iax_frames = ast_threadstorage_get(&frame_cache, sizeof(*iax_frames)))) {
|
||||||
free(fr);
|
free(fr);
|
||||||
|
@ -1012,11 +1008,6 @@ static void frame_cache_cleanup(void *data)
|
||||||
free(frames);
|
free(frames);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iax_frame_free(struct iax_frame *fr)
|
|
||||||
{
|
|
||||||
__iax_frame_free(fr, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
int iax_get_frames(void) { return frames; }
|
int iax_get_frames(void) { return frames; }
|
||||||
int iax_get_iframes(void) { return iframes; }
|
int iax_get_iframes(void) { return iframes; }
|
||||||
int iax_get_oframes(void) { return oframes; }
|
int iax_get_oframes(void) { return oframes; }
|
||||||
|
|
Loading…
Reference in New Issue