Projects
osmocom:master
osmo-bsc
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 177
View file
osmo-bsc.spec
Changed
@@ -18,13 +18,13 @@ Name: osmo-bsc Requires: osmocom-master -Version: 1.10.0.229.2ab39f +Version: 1.10.0.230.94426 Release: 0 Summary: OsmoBSC: Osmocom's Base Station Controller for 2G CS mobile networks License: AGPL-3.0-or-later AND GPL-2.0-or-later Group: Hardware/Mobile URL: https://osmocom.org/projects/osmobsc -Source: osmo-bsc_1.10.0.229.2ab39f.tar.xz +Source: osmo-bsc_1.10.0.230.94426.tar.xz Source1: rpmlintrc BuildRequires: automake >= 1.9 BuildRequires: libtool >= 2
View file
commit_2ab39f7fa08fe84ca970bd1d9f6d8621321bb08d.txt
Deleted
View file
commit_94426aae6121ae67b624f6907ed675df573f49fb.txt
Added
View file
osmo-bsc_1.10.0.229.2ab39f.dsc -> osmo-bsc_1.10.0.230.94426.dsc
Changed
@@ -2,7 +2,7 @@ Source: osmo-bsc Binary: osmo-bsc, osmo-bsc-dbg, abisip-find, osmo-bsc-ipaccess-utils, osmo-bsc-bs11-utils, osmo-bsc-meas-utils, osmo-bsc-doc Architecture: any all -Version: 1.10.0.229.2ab39f +Version: 1.10.0.230.94426 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/osmo-bsc Standards-Version: 3.9.8 @@ -18,8 +18,8 @@ osmo-bsc-ipaccess-utils deb net extra arch=any osmo-bsc-meas-utils deb net extra arch=any Checksums-Sha1: - 55769f86a0b2ef3327fed53f855d87e58947e5a2 613144 osmo-bsc_1.10.0.229.2ab39f.tar.xz + f674a0bb6af2906ef20a2f3db5bd4802fc4809c6 613264 osmo-bsc_1.10.0.230.94426.tar.xz Checksums-Sha256: - d5370cc691ce9235007a3925f99ea9f1b1a5a237d5df4190883ad9508d51ff85 613144 osmo-bsc_1.10.0.229.2ab39f.tar.xz + f67bd6c01bc977ab045a00b6042d14b83f21e7a4dae0b047f2784435150af8a8 613264 osmo-bsc_1.10.0.230.94426.tar.xz Files: - c259287ee6edffb489995289f26b18dc 613144 osmo-bsc_1.10.0.229.2ab39f.tar.xz + e378f65e649ed5179bfc39d95bf5474a 613264 osmo-bsc_1.10.0.230.94426.tar.xz
View file
osmo-bsc_1.10.0.229.2ab39f.tar.xz/.tarball-version -> osmo-bsc_1.10.0.230.94426.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.10.0.229-2ab39f +1.10.0.230-94426
View file
osmo-bsc_1.10.0.229.2ab39f.tar.xz/debian/changelog -> osmo-bsc_1.10.0.230.94426.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -osmo-bsc (1.10.0.229.2ab39f) unstable; urgency=medium +osmo-bsc (1.10.0.230.94426) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Tue, 29 Aug 2023 11:35:57 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Tue, 29 Aug 2023 17:05:52 +0000 osmo-bsc (1.10.0) unstable; urgency=medium
View file
osmo-bsc_1.10.0.229.2ab39f.tar.xz/src/osmo-bsc/meas_feed.c -> osmo-bsc_1.10.0.230.94426.tar.xz/src/osmo-bsc/meas_feed.c
Changed
@@ -29,7 +29,9 @@ uint16_t dst_port; }; -static struct meas_feed_state g_mfs = {}; +static struct meas_feed_state g_mfs = { + .wqueue.bfd.fd = -1, +}; static int process_meas_rep(struct gsm_meas_rep *mr) { @@ -37,6 +39,8 @@ struct meas_feed_meas *mfm; struct bsc_subscr *bsub; + OSMO_ASSERT(g_mfs.wqueue.bfd.fd != -1); + /* ignore measurements as long as we don't know who it is */ if (!mr->lchan) { LOGP(DMEAS, LOGL_DEBUG, "meas_feed: no lchan, not sending report\n"); @@ -49,7 +53,7 @@ bsub = mr->lchan->conn->bsub; - msg = msgb_alloc(sizeof(struct meas_feed_meas), "Meas. Feed"); + msg = msgb_alloc(sizeof(struct meas_feed_meas), "meas_feed_msg"); if (!msg) return 0; @@ -125,48 +129,47 @@ return rc; } +static void meas_feed_close(void) +{ + if (g_mfs.wqueue.bfd.fd == -1) + return; + osmo_signal_unregister_handler(SS_LCHAN, meas_feed_sig_cb, NULL); + osmo_wqueue_clear(&g_mfs.wqueue); + osmo_fd_unregister(&g_mfs.wqueue.bfd); + close(g_mfs.wqueue.bfd.fd); + g_mfs.wqueue.bfd.fd = -1; +} + int meas_feed_cfg_set(const char *dst_host, uint16_t dst_port) { int rc; - int already_initialized = 0; - - if (g_mfs.wqueue.bfd.fd) - already_initialized = 1; - - - if (already_initialized && - !strcmp(dst_host, g_mfs.dst_host) && - dst_port == g_mfs.dst_port) - return 0; - if (!already_initialized) { - osmo_wqueue_init(&g_mfs.wqueue, 10); - g_mfs.wqueue.write_cb = feed_write_cb; - g_mfs.wqueue.read_cb = feed_read_cb; - osmo_signal_register_handler(SS_LCHAN, meas_feed_sig_cb, NULL); - LOGP(DMEAS, LOGL_DEBUG, "meas_feed: registered signal callback\n"); + /* Already initialized */ + if (g_mfs.wqueue.bfd.fd > 0) { + /* No change needed, do nothing */ + if (!strcmp(dst_host, g_mfs.dst_host) && dst_port == g_mfs.dst_port) + return 0; + meas_feed_close(); } - if (already_initialized) { - osmo_wqueue_clear(&g_mfs.wqueue); - osmo_fd_unregister(&g_mfs.wqueue.bfd); - close(g_mfs.wqueue.bfd.fd); - /* don't set to zero, as that would mean 'not yet initialized' */ - g_mfs.wqueue.bfd.fd = -1; - } + osmo_wqueue_init(&g_mfs.wqueue, 10); + g_mfs.wqueue.write_cb = feed_write_cb; + g_mfs.wqueue.read_cb = feed_read_cb; + rc = osmo_sock_init_ofd(&g_mfs.wqueue.bfd, AF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP, dst_host, dst_port, OSMO_SOCK_F_CONNECT); - if (rc < 0) + if (rc < 0) { + g_mfs.wqueue.bfd.fd = -1; return rc; + } osmo_fd_read_disable(&g_mfs.wqueue.bfd); - - if (g_mfs.dst_host) - talloc_free(g_mfs.dst_host); - g_mfs.dst_host = talloc_strdup(NULL, dst_host); + osmo_talloc_replace_string(NULL, &g_mfs.dst_host, dst_host); g_mfs.dst_port = dst_port; - + osmo_signal_register_handler(SS_LCHAN, meas_feed_sig_cb, NULL); + LOGP(DMEAS, LOGL_DEBUG, "meas_feed: started %s\n", + osmo_sock_get_name2(g_mfs.wqueue.bfd.fd)); return 0; }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.