Change in osmo-pcap[master]: server: 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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Oct 8 12:41:36 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11269 )

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

server: Properly name main talloc ctx

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

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo_server_main.c b/src/osmo_server_main.c
index 95f3ce1..20928cd 100644
--- a/src/osmo_server_main.c
+++ b/src/osmo_server_main.c
@@ -49,7 +49,7 @@
 static const char *config_file = "osmo-pcap-server.cfg";
 static int daemonize = 0;
 
-void *tall_bsc_ctx;
+void *tall_srv_ctx;
 struct osmo_pcap_server *pcap_server;
 extern void *tall_msgb_ctx;
 extern void *tall_ctr_ctx;
@@ -173,7 +173,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_srv_ctx, stderr);
 		break;
 	case SIGHUP:
 		osmo_pcap_server_reopen(pcap_server);
@@ -185,9 +185,9 @@
 
 static void talloc_init_ctx()
 {
-	tall_bsc_ctx = talloc_named_const(NULL, 0, "server");
-	tall_msgb_ctx = talloc_named_const(tall_bsc_ctx, 0, "msgb");
-	tall_ctr_ctx = talloc_named_const(tall_bsc_ctx, 0, "counter");
+	tall_srv_ctx = talloc_named_const(NULL, 0, "server");
+	tall_msgb_ctx = talloc_named_const(tall_srv_ctx, 0, "msgb");
+	tall_ctr_ctx = talloc_named_const(tall_srv_ctx, 0, "counter");
 }
 
 int main(int argc, char **argv)
@@ -205,8 +205,8 @@
 	/* parse options */
 	handle_options(argc, argv);
 
-	rate_ctr_init(tall_bsc_ctx);
-	osmo_stats_init(tall_bsc_ctx);
+	rate_ctr_init(tall_srv_ctx);
+	osmo_stats_init(tall_srv_ctx);
 
 	/* seed the PRNG */
 	srand(time(NULL));
@@ -219,13 +219,13 @@
 
 	osmo_tls_init();
 
-	rc = telnet_init(tall_bsc_ctx, NULL, OSMO_VTY_PORT_PCAP_SERVER);
+	rc = telnet_init(tall_srv_ctx, NULL, OSMO_VTY_PORT_PCAP_SERVER);
 	if (rc < 0) {
 		LOGP(DCLIENT, LOGL_ERROR, "Failed to bind telnet interface\n");
 		exit(1);
 	}
 
-	pcap_server = talloc_zero(tall_bsc_ctx, struct osmo_pcap_server);
+	pcap_server = talloc_zero(tall_srv_ctx, struct osmo_pcap_server);
 	if (!pcap_server) {
 		LOGP(DSERVER, LOGL_ERROR, "Failed to allocate osmo_pcap_server.\n");
 		exit(1);

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

Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I810417d84c6a6ebcbc4b75a9bc41607bb0637228
Gerrit-Change-Number: 11269
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181008/df3d236f/attachment.htm>


More information about the gerrit-log mailing list