Merged revisions 143082 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

........
  r143082 | mvanbaak | 2008-09-15 00:16:34 +0200 (Mon, 15 Sep 2008) | 11 lines
  
  plug a couple of memleaks in chan_skinny.
  
  (closes issue #13452)
  Reported by: pj
  Patches:
        memleak5.diff uploaded by wedhorn (license 30)
  Tested by: wedhorn, pj, mvanbaak
  
  (closes issue #13294)
  Reported by: pj
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@143083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Michiel van Baak 17 years ago
parent 6e52004f8b
commit 4097442bdb

@ -1856,6 +1856,7 @@ static int transmit_response(struct skinnysession *s, struct skinny_req *req)
}
ast_free(req);
ast_mutex_unlock(&s->lock);
return 1;
}
@ -1953,9 +1954,11 @@ static void transmit_tone(struct skinnysession *s, int tone, int instance, int r
req->data.stoptone.reference = htolel(reference);
}
if (tone > 0) {
req->data.starttone.tone = htolel(tone);
}
//Bad, tone is already set so this is redundant and a change to the if above
//may lead to issues where we try to set a tone to a stop_tone_message
//if (tone > 0) {
// req->data.starttone.tone = htolel(tone);
//}
transmit_response(s, req);
}
@ -2019,8 +2022,10 @@ static void transmit_displaymessage(struct skinnysession *s, const char *text, i
if (!(req = req_alloc(0, CLEAR_DISPLAY_MESSAGE)))
return;
req->data.clearpromptstatus.lineInstance = instance;
req->data.clearpromptstatus.callReference = reference;
//what do we want hear CLEAR_DISPLAY_MESSAGE or CLEAR_PROMPT_STATUS???
//if we are clearing the display, it appears there is no instance and refernece info (size 0)
//req->data.clearpromptstatus.lineInstance = instance;
//req->data.clearpromptstatus.callReference = reference;
if (skinnydebug)
ast_debug(1, "Clearing Display\n");
@ -3444,6 +3449,7 @@ static int skinny_hangup(struct ast_channel *ast)
sub->rtp = NULL;
}
ast_mutex_unlock(&sub->lock);
ast_free(sub);
return 0;
}

Loading…
Cancel
Save