Merged revisions 58023 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Tue, 6 Mar 2007 18:02:35 +0000 (18:02 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 6 Mar 2007 18:02:35 +0000 (18:02 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r58023 | russell | 2007-03-06 12:01:20 -0600 (Tue, 06 Mar 2007) | 3 lines

Return an error of transmit_response is called without a session.
(issue #9002)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58025 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_skinny.c

index 730bf37..8d88f85 100644 (file)
@@ -1420,6 +1420,12 @@ static int skinny_unregister(struct skinny_req *req, struct skinnysession *s)
 static int transmit_response(struct skinnysession *s, struct skinny_req *req)
 {
        int res = 0;
+
+       if (!s) {
+               ast_log(LOG_WARNING, "Asked to transmit to a non-existant session!\n");
+               return -1;
+       }
+
        ast_mutex_lock(&s->lock);
 
        if (skinnydebug)