Don't unlock in handle_response
authorMark Spencer <markster@digium.com>
Mon, 14 Apr 2003 15:56:14 +0000 (15:56 +0000)
committerMark Spencer <markster@digium.com>
Mon, 14 Apr 2003 15:56:14 +0000 (15:56 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@845 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 71e4920..9be6056 100755 (executable)
@@ -3861,8 +3861,7 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
                                        ast_queue_hangup(p->owner, 0);
                                } else {
                                        if (!p->subscribed) {
                                        ast_queue_hangup(p->owner, 0);
                                } else {
                                        if (!p->subscribed) {
-                                           sip_destroy(p);
-                                           p = NULL;
+                                           p->needdestroy = 1;
                                        }
                                }
                        } else if (!strcasecmp(msg, "INVITE")) {
                                        }
                                }
                        } else if (!strcasecmp(msg, "INVITE")) {
@@ -3985,10 +3984,6 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
                        break;
                }
        }
                        break;
                }
        }
-       if (owner)
-               ast_pthread_mutex_unlock(&owner->lock);
-       if (p)
-               ast_pthread_mutex_unlock(&p->lock);
 }
 
 static int determine_firstline_parts( struct sip_request *req ) {
 }
 
 static int determine_firstline_parts( struct sip_request *req ) {