浏览代码

ims_qos: Rename new parameter's C variable

Stefan-Cristian Mititelu 1 年之前
父节点
当前提交
21a685a200
共有 2 个文件被更改,包括 13 次插入12 次删除
  1. 8 7
      src/modules/ims_qos/ims_qos_mod.c
  2. 5 5
      src/modules/ims_qos/rx_aar.c

+ 8 - 7
src/modules/ims_qos/ims_qos_mod.c

@@ -142,7 +142,7 @@ int terminate_dialog_on_rx_failure =
 		1; //this specifies whether a dialog is torn down when a media rx session fails - in some cases you might not want the dialog torn down
 		1; //this specifies whether a dialog is torn down when a media rx session fails - in some cases you might not want the dialog torn down
 int delete_contact_on_rx_failure =
 int delete_contact_on_rx_failure =
 		1; //If this is set we delete the contact if the associated signalling bearer is removed
 		1; //If this is set we delete the contact if the associated signalling bearer is removed
-int suspend_transaction =
+int _ims_qos_suspend_transaction =
 		1; //If this is set we suspend the transaction and continue later
 		1; //If this is set we suspend the transaction and continue later
 
 
 
 
@@ -252,7 +252,8 @@ static param_export_t params[] = {{"rx_dest_realm", PARAM_STR, &rx_dest_realm},
 		{"regex_sdp_ip_prefix_to_maintain_in_fd", PARAM_STR,
 		{"regex_sdp_ip_prefix_to_maintain_in_fd", PARAM_STR,
 				&regex_sdp_ip_prefix_to_maintain_in_fd},
 				&regex_sdp_ip_prefix_to_maintain_in_fd},
 		{"include_rtcp_fd", INT_PARAM, &include_rtcp_fd},
 		{"include_rtcp_fd", INT_PARAM, &include_rtcp_fd},
-		{"suspend_transaction", INT_PARAM, &suspend_transaction}, {0, 0, 0}};
+		{"suspend_transaction", INT_PARAM, &_ims_qos_suspend_transaction},
+		{0, 0, 0}};
 
 
 
 
 /** module exports */
 /** module exports */
@@ -1237,7 +1238,7 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char *dir, char *c_id,
 	}
 	}
 	saved_t_data->dlg = dlg;
 	saved_t_data->dlg = dlg;
 
 
-	if(suspend_transaction) {
+	if(_ims_qos_suspend_transaction) {
 		LM_DBG("Suspending SIP TM transaction\n");
 		LM_DBG("Suspending SIP TM transaction\n");
 		if(tmb.t_suspend(msg, &saved_t_data->tindex, &saved_t_data->tlabel)
 		if(tmb.t_suspend(msg, &saved_t_data->tindex, &saved_t_data->tlabel)
 				!= 0) {
 				!= 0) {
@@ -1256,7 +1257,7 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char *dir, char *c_id,
 
 
 	if(!ret) {
 	if(!ret) {
 		LM_ERR("Failed to send AAR\n");
 		LM_ERR("Failed to send AAR\n");
-		if(suspend_transaction) {
+		if(_ims_qos_suspend_transaction) {
 			tmb.t_cancel_suspend(saved_t_data->tindex, saved_t_data->tlabel);
 			tmb.t_cancel_suspend(saved_t_data->tindex, saved_t_data->tlabel);
 		}
 		}
 		goto error;
 		goto error;
@@ -1441,7 +1442,7 @@ static int w_rx_aar_register(
 		return CSCF_RETURN_ERROR;
 		return CSCF_RETURN_ERROR;
 	}
 	}
 
 
-	if(suspend_transaction) {
+	if(_ims_qos_suspend_transaction) {
 		LM_DBG("Suspending SIP TM transaction\n");
 		LM_DBG("Suspending SIP TM transaction\n");
 		if(tmb.t_suspend(msg, &saved_t_data->tindex, &saved_t_data->tlabel)
 		if(tmb.t_suspend(msg, &saved_t_data->tindex, &saved_t_data->tlabel)
 				!= 0) {
 				!= 0) {
@@ -1677,7 +1678,7 @@ static int w_rx_aar_register(
 		return CSCF_RETURN_BREAK; //on success we break - because rest of cfg file will be executed by async process
 		return CSCF_RETURN_BREAK; //on success we break - because rest of cfg file will be executed by async process
 	} else {
 	} else {
 		create_return_code(CSCF_RETURN_TRUE);
 		create_return_code(CSCF_RETURN_TRUE);
-		if(suspend_transaction) {
+		if(_ims_qos_suspend_transaction) {
 			tmb.t_cancel_suspend(saved_t_data->tindex, saved_t_data->tlabel);
 			tmb.t_cancel_suspend(saved_t_data->tindex, saved_t_data->tlabel);
 		}
 		}
 		if(saved_t_data) {
 		if(saved_t_data) {
@@ -1690,7 +1691,7 @@ static int w_rx_aar_register(
 error:
 error:
 	LM_ERR("Error trying to send AAR\n");
 	LM_ERR("Error trying to send AAR\n");
 	if(!aar_sent) {
 	if(!aar_sent) {
-		if(suspend_transaction) {
+		if(_ims_qos_suspend_transaction) {
 			tmb.t_cancel_suspend(saved_t_data->tindex, saved_t_data->tlabel);
 			tmb.t_cancel_suspend(saved_t_data->tindex, saved_t_data->tlabel);
 		}
 		}
 		if(saved_t_data) {
 		if(saved_t_data) {

+ 5 - 5
src/modules/ims_qos/rx_aar.c

@@ -76,7 +76,7 @@ extern usrloc_api_t ul;
 extern struct ims_qos_counters_h ims_qos_cnts_h;
 extern struct ims_qos_counters_h ims_qos_cnts_h;
 
 
 extern int authorize_video_flow;
 extern int authorize_video_flow;
-extern int suspend_transaction;
+extern int _ims_qos_suspend_transaction;
 
 
 extern str af_signaling_ip;
 extern str af_signaling_ip;
 extern str af_signaling_ip6;
 extern str af_signaling_ip6;
@@ -114,7 +114,7 @@ void async_aar_callback(
 
 
 	LM_DBG("received AAA answer");
 	LM_DBG("received AAA answer");
 
 
-	if(suspend_transaction) {
+	if(_ims_qos_suspend_transaction) {
 		if(tmb.t_lookup_ident(&t, data->tindex, data->tlabel) < 0) {
 		if(tmb.t_lookup_ident(&t, data->tindex, data->tlabel) < 0) {
 			LM_ERR("t_continue: transaction not found\n");
 			LM_ERR("t_continue: transaction not found\n");
 			goto error;
 			goto error;
@@ -231,7 +231,7 @@ done:
 	if(aaa)
 	if(aaa)
 		cdpb.AAAFreeMessage(&aaa);
 		cdpb.AAAFreeMessage(&aaa);
 
 
-	if(suspend_transaction) {
+	if(_ims_qos_suspend_transaction) {
 		tmb.t_continue(data->tindex, data->tlabel, data->act);
 		tmb.t_continue(data->tindex, data->tlabel, data->act);
 	}
 	}
 	free_saved_transaction_global_data(data);
 	free_saved_transaction_global_data(data);
@@ -277,7 +277,7 @@ void async_aar_reg_callback(
 		   "failures flag is [%d]\n",
 		   "failures flag is [%d]\n",
 			data->answers_not_received, data->failed);
 			data->answers_not_received, data->failed);
 
 
-	if(suspend_transaction) {
+	if(_ims_qos_suspend_transaction) {
 		if(tmb.t_lookup_ident(&t, data->tindex, data->tlabel) < 0) {
 		if(tmb.t_lookup_ident(&t, data->tindex, data->tlabel) < 0) {
 			LM_ERR("t_continue: transaction not found\n");
 			LM_ERR("t_continue: transaction not found\n");
 			goto error;
 			goto error;
@@ -430,7 +430,7 @@ done:
 		cdpb.AAAFreeMessage(&aaa);
 		cdpb.AAAFreeMessage(&aaa);
 
 
 	if(finalReply) {
 	if(finalReply) {
-		if(suspend_transaction) {
+		if(_ims_qos_suspend_transaction) {
 			tmb.t_continue(data->tindex, data->tlabel, data->act);
 			tmb.t_continue(data->tindex, data->tlabel, data->act);
 		}
 		}
 		free_saved_transaction_global_data(data);
 		free_saved_transaction_global_data(data);