Browse code

- array holding tag value inserted into replies made public

Jan Janak authored on 29/04/2003 16:33:56
Showing 2 changed files
... ...
@@ -44,7 +44,7 @@
44 44
  *  2003-04-05  s/reply_route/failure_route, onreply_route introduced (jiri)
45 45
  *  2003-04-14  local acks generated before reply processing to avoid
46 46
  *              delays in length reply processing (like opening TCP
47
- *              connnection to an unavailable destination) (jiri)
47
+ *              connection to an unavailable destination) (jiri)
48 48
  */
49 49
 
50 50
 
... ...
@@ -81,7 +81,8 @@
81 81
 enum route_mode rmode=MODE_REQUEST;
82 82
 
83 83
 /* private place where we create to-tags for replies */
84
-static char tm_tags[TOTAG_VALUE_LEN];
84
+/* janakj: made public, I need to access this value to store it in dialogs */
85
+char tm_tags[TOTAG_VALUE_LEN];
85 86
 static char *tm_tag_suffix;
86 87
 
87 88
 /* where to go if there is no positive reply */
... ...
@@ -1096,26 +1097,24 @@ int reply_received( struct sip_msg  *p_msg )
1096 1097
 	/* stop final response timer only if I got a final response */
1097 1098
 	if ( msg_status >= 200 )
1098 1099
 		reset_timer( &uac->request.fr_timer);
1099
-	/* acknowledge negative INVITE replies (do it before detailed
1100
-	   on_reply processing, which may take very long, like if it
1101
-	   is attempted to establish a TCP connection to a fail-over dst
1102
-	*/
1100
+        
1101
+        /* acknowledge negative INVITE replies (do it before detailed
1102
+           on_reply processing, which may take very long, like if it
1103
+           is attempted to establish a TCP connection to a fail-over dst
1104
+        */
1103 1105
 	if (t->is_invite && (msg_status>=300 || (t->local && msg_status>=200))) {
1104
-		ack = build_ack( p_msg, t, branch , &ack_len);
1106
+		ack = build_ack( p_msg, t, branch, &ack_len);
1105 1107
 		if (ack) {
1106 1108
 			SEND_PR_BUFFER( &uac->request, ack, ack_len );
1107 1109
 			shm_free(ack);
1108 1110
 		}
1109 1111
 	} /* ack-ing negative INVITE replies */
1110
-
1111 1112
 	/* processing of on_reply block */
1112 1113
 	if (t->on_reply) {
1113 1114
 		rmode=MODE_ONREPLY;
1114 1115
 	 	if (run_actions(onreply_rlist[t->on_reply], p_msg)<0) 
1115 1116
 			LOG(L_ERR, "ERROR: on_reply processing failed\n");
1116 1117
 	}
1117
-
1118
-
1119 1118
 	LOCK_REPLIES( t );
1120 1119
 	if (t->local) {
1121 1120
 		reply_status=local_reply( t, p_msg, branch, msg_status, &cancel_bitmap );
... ...
@@ -1127,7 +1126,6 @@ int reply_received( struct sip_msg  *p_msg )
1127 1126
 	if (reply_status==RPS_ERROR)
1128 1127
 		goto done;
1129 1128
 
1130
-
1131 1129
 	/* clean-up the transaction when transaction completed */
1132 1130
 	if (reply_status==RPS_COMPLETED) {
1133 1131
 		/* no more UAC FR/RETR (if I received a 2xx, there may
... ...
@@ -31,7 +31,7 @@
31 31
 #define _T_REPLY_H
32 32
 
33 33
 #include "defs.h"
34
-
34
+#include "../../tags.h"
35 35
 
36 36
 #include "h_table.h"
37 37
 
... ...
@@ -51,6 +51,8 @@ enum rps {
51 51
 	RPS_PROVISIONAL
52 52
 };
53 53
 
54
+extern char tm_tags[TOTAG_VALUE_LEN];
55
+
54 56
 enum route_mode { MODE_REQUEST=1, MODE_ONREPLY, MODE_ONFAILURE };
55 57
 extern enum route_mode rmode;
56 58