Merged revisions 324479 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324479 | rmudgett | 2011-06-22 13:26:55 -0500 (Wed, 22 Jun 2011) | 1 line
  
  Comments and whitespace in chan_sip.c
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2011-06-22 18:27:43 +00:00
parent 698bc02570
commit e8c0be8fc2

View File

@@ -3342,12 +3342,17 @@ static inline const char *get_transport_pvt(struct sip_pvt *p)
return get_transport(p->socket.type); return get_transport(p->socket.type);
} }
/*! \brief Transmit SIP message /*!
Sends a SIP request or response on a given socket (in the pvt) * \internal
Called by retrans_pkt, send_request, send_response and * \brief Transmit SIP message
__sip_reliable_xmit *
\return length of transmitted message, XMIT_ERROR on known network failures -1 on other failures. * \details
*/ * Sends a SIP request or response on a given socket (in the pvt)
* \note
* Called by retrans_pkt, send_request, send_response and __sip_reliable_xmit
*
* \return length of transmitted message, XMIT_ERROR on known network failures -1 on other failures.
*/
static int __sip_xmit(struct sip_pvt *p, struct ast_str *data, int len) static int __sip_xmit(struct sip_pvt *p, struct ast_str *data, int len)
{ {
int res = 0; int res = 0;
@@ -3745,9 +3750,11 @@ static int retrans_pkt(const void *data)
return 0; return 0;
} }
/*! \brief Transmit packet with retransmits /*!
\return 0 on success, -1 on failure to allocate packet * \internal
*/ * \brief Transmit packet with retransmits
* \return 0 on success, -1 on failure to allocate packet
*/
static enum sip_result __sip_reliable_xmit(struct sip_pvt *p, int seqno, int resp, struct ast_str *data, int len, int fatal, int sipmethod) static enum sip_result __sip_reliable_xmit(struct sip_pvt *p, int seqno, int resp, struct ast_str *data, int len, int fatal, int sipmethod)
{ {
struct sip_pkt *pkt = NULL; struct sip_pkt *pkt = NULL;
@@ -4179,9 +4186,11 @@ static int send_response(struct sip_pvt *p, struct sip_request *req, enum xmitty
return res; return res;
} }
/*! \brief Send SIP Request to the other part of the dialogue /*!
\return see \ref __sip_xmit * \internal
*/ * \brief Send SIP Request to the other part of the dialogue
* \return see \ref __sip_xmit
*/
static int send_request(struct sip_pvt *p, struct sip_request *req, enum xmittype reliable, int seqno) static int send_request(struct sip_pvt *p, struct sip_request *req, enum xmittype reliable, int seqno)
{ {
int res; int res;
@@ -4438,8 +4447,11 @@ static const char *sip_get_callid(struct ast_channel *chan)
return chan->tech_pvt ? ((struct sip_pvt *) chan->tech_pvt)->callid : ""; return chan->tech_pvt ? ((struct sip_pvt *) chan->tech_pvt)->callid : "";
} }
/*! \brief Send SIP MESSAGE text within a call /*!
Called from PBX core sendtext() application */ * \internal
* \brief Send SIP MESSAGE text within a call
* \note Called from PBX core sendtext() application
*/
static int sip_sendtext(struct ast_channel *ast, const char *text) static int sip_sendtext(struct ast_channel *ast, const char *text)
{ {
struct sip_pvt *dialog = ast->tech_pvt; struct sip_pvt *dialog = ast->tech_pvt;
@@ -20854,7 +20866,7 @@ static void handle_response(struct sip_pvt *p, int resp, const char *rest, struc
pvt_set_needdestroy(p, "received 491 response"); pvt_set_needdestroy(p, "received 491 response");
} }
break; break;
case 405: case 405: /* Method not allowed */
case 501: /* Not Implemented */ case 501: /* Not Implemented */
mark_method_unallowed(&p->allowed_methods, sipmethod); mark_method_unallowed(&p->allowed_methods, sipmethod);
if (p->relatedpeer) { if (p->relatedpeer) {
@@ -20865,7 +20877,6 @@ static void handle_response(struct sip_pvt *p, int resp, const char *rest, struc
else else
ast_log(LOG_WARNING, "Host '%s' does not implement '%s'\n", ast_sockaddr_stringify(&p->sa), msg); ast_log(LOG_WARNING, "Host '%s' does not implement '%s'\n", ast_sockaddr_stringify(&p->sa), msg);
break; break;
/* Fallthrough */
default: default:
if ((resp >= 200) && (resp < 300)) { /* on any 2XX response do the following */ if ((resp >= 200) && (resp < 300)) { /* on any 2XX response do the following */
if (sipmethod == SIP_INVITE) { if (sipmethod == SIP_INVITE) {
@@ -20885,17 +20896,17 @@ static void handle_response(struct sip_pvt *p, int resp, const char *rest, struc
case 301: /* Moved permanently */ case 301: /* Moved permanently */
case 302: /* Moved temporarily */ case 302: /* Moved temporarily */
case 305: /* Use Proxy */ case 305: /* Use Proxy */
if (p->owner) { if (p->owner) {
struct ast_party_redirecting redirecting; struct ast_party_redirecting redirecting;
struct ast_set_party_redirecting update_redirecting; struct ast_set_party_redirecting update_redirecting;
ast_party_redirecting_init(&redirecting); ast_party_redirecting_init(&redirecting);
change_redirecting_information(p, req, &redirecting, change_redirecting_information(p, req, &redirecting,
&update_redirecting, TRUE); &update_redirecting, TRUE);
ast_channel_set_redirecting(p->owner, &redirecting, ast_channel_set_redirecting(p->owner, &redirecting,
&update_redirecting); &update_redirecting);
ast_party_redirecting_free(&redirecting); ast_party_redirecting_free(&redirecting);
} }
/* Fall through */ /* Fall through */
case 486: /* Busy here */ case 486: /* Busy here */
case 600: /* Busy everywhere */ case 600: /* Busy everywhere */