[asterisk-commits] res pjsip transport management.c: Rename some variables. (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 14 12:49:45 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6191 )

Change subject: res_pjsip_transport_management.c: Rename some variables.
......................................................................

res_pjsip_transport_management.c: Rename some variables.

* Use monitored instead of the misleading keepalive name.

Change-Id: I9e5bcbb4ab2b82d49bcd0f06dfe85d15e0b552b6
---
M res/res_pjsip_transport_management.c
1 file changed, 9 insertions(+), 9 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Verified
  Jenkins2: Approved for Submit



diff --git a/res/res_pjsip_transport_management.c b/res/res_pjsip_transport_management.c
index 3e129dc..86c53ca 100644
--- a/res/res_pjsip_transport_management.c
+++ b/res/res_pjsip_transport_management.c
@@ -33,7 +33,7 @@
 #include "asterisk/module.h"
 #include "asterisk/astobj2.h"
 
-/*! \brief Number of buckets for keepalive transports */
+/*! \brief Number of buckets for monitored transports */
 #define TRANSPORTS_BUCKETS 53
 
 #define IDLE_TIMEOUT (pjsip_cfg()->tsx.td)
@@ -114,7 +114,7 @@
 
 static int idle_sched_cb(const void *data)
 {
-	struct monitored_transport *keepalive = (struct monitored_transport *) data;
+	struct monitored_transport *monitored = (struct monitored_transport *) data;
 
 	if (!pj_thread_is_registered()) {
 		pj_thread_t *thread;
@@ -123,7 +123,7 @@
 		desc = ast_threadstorage_get(&desc_storage, sizeof(pj_thread_desc));
 		if (!desc) {
 			ast_log(LOG_ERROR, "Could not get thread desc from thread-local storage.\n");
-			ao2_ref(keepalive, -1);
+			ao2_ref(monitored, -1);
 			return 0;
 		}
 
@@ -132,22 +132,22 @@
 		pj_thread_register("Transport Monitor", *desc, &thread);
 	}
 
-	if (!keepalive->sip_received) {
+	if (!monitored->sip_received) {
 		ast_log(LOG_NOTICE, "Shutting down transport '%s' since no request was received in %d seconds\n",
-				keepalive->transport->info, IDLE_TIMEOUT / 1000);
-		pjsip_transport_shutdown(keepalive->transport);
+			monitored->transport->info, IDLE_TIMEOUT / 1000);
+		pjsip_transport_shutdown(monitored->transport);
 	}
 
-	ao2_ref(keepalive, -1);
+	ao2_ref(monitored, -1);
 	return 0;
 }
 
 /*! \brief Destructor for keepalive transport */
 static void monitored_transport_destroy(void *obj)
 {
-	struct monitored_transport *keepalive = obj;
+	struct monitored_transport *monitored = obj;
 
-	pjsip_transport_dec_ref(keepalive->transport);
+	pjsip_transport_dec_ref(monitored->transport);
 }
 
 /*! \brief Callback invoked when transport changes occur */

-- 
To view, visit https://gerrit.asterisk.org/6191
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I9e5bcbb4ab2b82d49bcd0f06dfe85d15e0b552b6
Gerrit-Change-Number: 6191
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170814/dadbd069/attachment-0001.html>


More information about the asterisk-commits mailing list