summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2006-04-23 06:22:29 +0000
committerOlle Johansson <oej@edvina.net>2006-04-23 06:22:29 +0000
commit5873462c2e0bf74ecfd316db3ece34424870acdf (patch)
tree7ff5f4497025d4843abddb20dfc8058683806bd4 /channels/chan_sip.c
parenta83297d85fef0396a45a2cab0005d7cd0478ed58 (diff)
- Add doxygen documentation for sipsock_read locking
- Improve documentation of pedantic (related to issue #7016) From the air above Russia... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index cfbcb1608..276577dd1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -61,6 +61,8 @@
* if it's a response to an outbound request, it's sent to handle_response().
* If it is a request, handle_request sends it to one of a list of functions
* depending on the request type - INVITE, OPTIONS, REFER, BYE, CANCEL etc
+ * sipsock_read locks the ast_channel if it exists (an active call) and
+ * unlocks it after we have processed the SIP message.
*
* A new INVITE is sent to handle_request_invite(), that will end up
* starting a new channel in the PBX, the new channel after that executing
@@ -11867,6 +11869,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
}
/*! \brief Read data from SIP socket
+\note sipsock_read locks the owner channel while we are processing the SIP message
\return 1 on error, 0 on success
\note Successful messages is connected to SIP call and forwarded to handle_request()
*/
@@ -11924,6 +11927,8 @@ static int sipsock_read(int *id, int fd, short events, void *ignore)
/* Process request, with netlock held */
retrylock:
ast_mutex_lock(&netlock);
+
+ /* Find the active SIP dialog or create a new one */
p = find_call(&req, &sin, req.method); /* returns p locked */
if (p) {
/* Go ahead and lock the owner if it has one -- we may need it */