Change in osmo-pcap[master]: client: Properly name main talloc ctx

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Oct 8 11:36:40 UTC 2018


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/11268


Change subject: client: Properly name main talloc ctx
......................................................................

client: Properly name main talloc ctx

Change-Id: Ibaa7f0e0add5f5e61cc0bb82341ee3b6b5c0cf07
---
M src/osmo_client_main.c
1 file changed, 9 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/68/11268/1

diff --git a/src/osmo_client_main.c b/src/osmo_client_main.c
index 46a49b5..43de544 100644
--- a/src/osmo_client_main.c
+++ b/src/osmo_client_main.c
@@ -48,7 +48,7 @@
 static const char *config_file = "osmo-pcap-client.cfg";
 static int daemonize = 0;
 
-void *tall_bsc_ctx;
+void *tall_cli_ctx;
 struct osmo_pcap_client *pcap_client;
 extern void *tall_msgb_ctx;
 extern void *tall_ctr_ctx;
@@ -163,7 +163,7 @@
 		 * and then return to the caller, who will abort the process */
 	case SIGUSR1:
 		talloc_report(tall_vty_ctx, stderr);
-		talloc_report_full(tall_bsc_ctx, stderr);
+		talloc_report_full(tall_cli_ctx, stderr);
 		break;
 	default:
 		break;
@@ -172,9 +172,9 @@
 
 static void talloc_init_ctx()
 {
-	tall_bsc_ctx = talloc_named_const(NULL, 0, "nat");
-	tall_msgb_ctx = talloc_named_const(tall_bsc_ctx, 0, "msgb");
-	tall_ctr_ctx = talloc_named_const(tall_bsc_ctx, 0, "counter");
+	tall_cli_ctx = talloc_named_const(NULL, 0, "client");
+	tall_msgb_ctx = talloc_named_const(tall_cli_ctx, 0, "msgb");
+	tall_ctr_ctx = talloc_named_const(tall_cli_ctx, 0, "counter");
 }
 
 int main(int argc, char **argv)
@@ -192,8 +192,8 @@
 	/* parse options */
 	handle_options(argc, argv);
 
-	rate_ctr_init(tall_bsc_ctx);
-	osmo_stats_init(tall_bsc_ctx);
+	rate_ctr_init(tall_cli_ctx);
+	osmo_stats_init(tall_cli_ctx);
 
 	/* seed the PRNG */
 	srand(time(NULL));
@@ -206,13 +206,13 @@
 
 	osmo_tls_init();
 
-	rc = telnet_init(tall_bsc_ctx, NULL, OSMO_VTY_PORT_PCAP_CLIENT);
+	rc = telnet_init(tall_cli_ctx, NULL, OSMO_VTY_PORT_PCAP_CLIENT);
 	if (rc < 0) {
 		LOGP(DCLIENT, LOGL_ERROR, "Failed to bind telnet interface\n");
 		exit(1);
 	}
 
-	pcap_client = talloc_zero(tall_bsc_ctx, struct osmo_pcap_client);
+	pcap_client = talloc_zero(tall_cli_ctx, struct osmo_pcap_client);
 	if (!pcap_client) {
 		LOGP(DCLIENT, LOGL_ERROR, "Failed to allocate osmo_pcap_client.\n");
 		exit(1);

-- 
To view, visit https://gerrit.osmocom.org/11268
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibaa7f0e0add5f5e61cc0bb82341ee3b6b5c0cf07
Gerrit-Change-Number: 11268
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181008/a08bb565/attachment.htm>


More information about the gerrit-log mailing list