[asterisk-commits] russell: branch group/sip_session_timers r84367 - /team/group/sip_session_tim...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 2 08:55:10 CDT 2007


Author: russell
Date: Tue Oct  2 08:55:09 2007
New Revision: 84367

URL: http://svn.digium.com/view/asterisk?view=rev&rev=84367
Log:
formatting fixes only

Modified:
    team/group/sip_session_timers/channels/chan_sip.c

Modified: team/group/sip_session_timers/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/sip_session_timers/channels/chan_sip.c?view=diff&rev=84367&r1=84366&r2=84367
==============================================================================
--- team/group/sip_session_timers/channels/chan_sip.c (original)
+++ team/group/sip_session_timers/channels/chan_sip.c Tue Oct  2 08:55:09 2007
@@ -1850,8 +1850,8 @@
 static int parse_minse (const char *p_hdrval, int *const p_interval);
 static int st_get_max_se(struct sip_pvt *);
 static int st_get_min_se(struct sip_pvt *);
-static enum st_refresher st_get_refresher(struct sip_pvt*);
-static enum st_mode st_get_mode(struct sip_pvt*);
+static enum st_refresher st_get_refresher(struct sip_pvt *);
+static enum st_mode st_get_mode(struct sip_pvt *);
 
 
 /*! \brief Definition of this channel for PBX channel registration */
@@ -2129,9 +2129,8 @@
 		Let the caller of this function know that an unknown option tag was 
 		encountered, so that if the UAC requires it then the request can be 
 		rejected with a 420 response. */
-		if (!found) {
+		if (!found)
 			profile |= SIP_OPT_UNKNOWN;
-		}
 
 		if (!found && sipdebug) {
 			if (!strncasecmp(next, "x-", 2))
@@ -5583,8 +5582,8 @@
 	const char *m;		/* SDP media offer */
 	const char *c;
 	const char *a;
-	const char *o;		/* Pointer to o= line	*/
-	char *o_copy;		/* Copy of o= line	*/
+	const char *o;		/* Pointer to o= line */
+	char *o_copy;		/* Copy of o= line */
 	char *token;
 	char host[258];
 	int len = -1;
@@ -5669,17 +5668,17 @@
 	}
 
 	o_copy = ast_strdupa(o);
-	token = strsep (&o_copy, " ");  /* Skip username   */
+	token = strsep(&o_copy, " ");  /* Skip username   */
 	if (!o_copy) { 
 		ast_log(LOG_WARNING, "SDP sytax error in o= line username\n");
 		return -1;
 	}
-	token = strsep (&o_copy, " ");  /* Skip session-id */
+	token = strsep(&o_copy, " ");  /* Skip session-id */
 	if (!o_copy) { 
 		ast_log(LOG_WARNING, "SDP sytax error in o= line session-id\n");
 		return -1;
 	}
-	token = strsep (&o_copy, " ");  /* Version         */
+	token = strsep(&o_copy, " ");  /* Version         */
 	if (!o_copy) { 
 		ast_log(LOG_WARNING, "SDP sytax error in o= line\n");
 		return -1;
@@ -6574,7 +6573,7 @@
 	if (p->st_active == TRUE && p->st_active_peer_ua == TRUE) {
 		char se_hdr[256];
 		int se_len = 0;
-		se_len = sprintf (&se_hdr[se_len], "%d;refresher=%s", p->st_interval, strefresher2str(p->st_ref));
+		se_len = sprintf(&se_hdr[se_len], "%d;refresher=%s", p->st_interval, strefresher2str(p->st_ref));
 		se_hdr[se_len] = '\0';
 		add_header(resp, "Require", "timer");
 		add_header(resp, "Session-Expires", se_hdr);
@@ -6715,12 +6714,12 @@
 	if (p->st_active == TRUE && p->st_active_peer_ua == TRUE) {
 		char se_hdr[256];
 		int se_len = 0;
-		se_len = sprintf (&se_hdr[se_len], "%d;refresher=%s", p->st_interval, strefresher2str(p->st_ref));
+		se_len = sprintf(&se_hdr[se_len], "%d;refresher=%s", p->st_interval, strefresher2str(p->st_ref));
 		se_hdr[se_len] = '\0';
 		add_header(req, "Require", "timer");
 		add_header(req, "Session-Expires", se_hdr);
 		se_len = 0;
-		se_len = sprintf (&se_hdr[se_len], "%d", st_get_min_se(p));
+		se_len = sprintf(&se_hdr[se_len], "%d", st_get_min_se(p));
 		se_hdr[se_len] = '\0';
 		add_header(req, "Min-SE", se_hdr);
 	}
@@ -6846,7 +6845,7 @@
     respprep(&resp, p, msg, req);
     append_date(&resp);
 
-    minse_str_len = sprintf (&minse_str[0], "%d", minse_int);
+    minse_str_len = sprintf(&minse_str[0], "%d", minse_int);
     if (minse_str_len) {
         minse_str[minse_str_len] = '\0';
         add_header(&resp, "Min-SE", &minse_str[0]);
@@ -7623,31 +7622,32 @@
 */
 static int transmit_reinvite_with_sdp(struct sip_pvt *p, int t38version, int oldsdp)
 {
-    struct sip_request req;
-
-    reqprep(&req, p, ast_test_flag(&p->flags[0], SIP_REINVITE_UPDATE) ?  SIP_UPDATE : SIP_INVITE, 0, 1);
-
-    add_header(&req, "Allow", ALLOWED_METHODS);
-    add_header(&req, "Supported", SUPPORTED_EXTENSIONS);
-    if (sipdebug) {
-        if (oldsdp == TRUE)
-            add_header(&req, "X-asterisk-Info", "SIP re-invite (Session-Timers)");
-        else
-            add_header(&req, "X-asterisk-Info", "SIP re-invite (External RTP bridge)");
-    }
-
-    if (p->do_history)
-        append_history(p, "ReInv", "Re-invite sent");
-    if (t38version)
-        add_t38_sdp(&req, p);
-    else
-        add_sdp(&req, p, oldsdp);
-
-    /* Use this as the basis */
-    initialize_initreq(p, &req);
-    p->lastinvite = p->ocseq;
-    ast_set_flag(&p->flags[0], SIP_OUTGOING);       /* Change direction of this dialog */
-    return send_request(p, &req, XMIT_CRITICAL, p->ocseq);
+	struct sip_request req;
+
+	reqprep(&req, p, ast_test_flag(&p->flags[0], SIP_REINVITE_UPDATE) ?  SIP_UPDATE : SIP_INVITE, 0, 1);
+
+	add_header(&req, "Allow", ALLOWED_METHODS);
+	add_header(&req, "Supported", SUPPORTED_EXTENSIONS);
+	if (sipdebug) {
+		if (oldsdp == TRUE)
+			add_header(&req, "X-asterisk-Info", "SIP re-invite (Session-Timers)");
+		else
+			add_header(&req, "X-asterisk-Info", "SIP re-invite (External RTP bridge)");
+	}
+
+	if (p->do_history)
+		append_history(p, "ReInv", "Re-invite sent");
+	if (t38version)
+		add_t38_sdp(&req, p);
+	else
+		add_sdp(&req, p, oldsdp);
+
+	/* Use this as the basis */
+	initialize_initreq(p, &req);
+	p->lastinvite = p->ocseq;
+	ast_set_flag(&p->flags[0], SIP_OUTGOING);       /* Change direction of this dialog */
+
+	return send_request(p, &req, XMIT_CRITICAL, p->ocseq);
 }
 
 /* \brief Remove URI parameters at end of URI, not in username part though */
@@ -7954,12 +7954,12 @@
 
 		p->st_active = TRUE;
 		
-		i2aidx = sprintf (&i2astr[0], "%d", p->st_interval);
+		i2aidx = sprintf(&i2astr[0], "%d", p->st_interval);
 		i2astr[i2aidx] = '\0';
 		add_header(&req, "Session-Expires", i2astr);
 
 		i2aidx = 0;
-		i2aidx = sprintf (&i2astr[0], "%d", st_get_min_se(p));
+		i2aidx = sprintf(&i2astr[0], "%d", st_get_min_se(p));
 		i2astr[i2aidx] = '\0';
 		add_header(&req, "Min-SE", i2astr);
 	}




More information about the asterisk-commits mailing list