[Asterisk-code-review] res pjsip transport management.c: Use monitored instead of t... (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Wed Aug 9 13:06:03 CDT 2017
Richard Mudgett has uploaded this change for review. ( https://gerrit.asterisk.org/6191
Change subject: res_pjsip_transport_management.c: Use monitored instead of the misleading keepalive name.
......................................................................
res_pjsip_transport_management.c: 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(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/91/6191/1
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: newchange
Gerrit-Change-Id: I9e5bcbb4ab2b82d49bcd0f06dfe85d15e0b552b6
Gerrit-Change-Number: 6191
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170809/cf749213/attachment-0001.html>
More information about the asterisk-code-review
mailing list