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.orgPau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/10487
Change subject: Use osmo_clock_gettime from libosmocore
......................................................................
Use osmo_clock_gettime from libosmocore
Change-Id: Ic638849c6687c376c4c0c36cc286d499a073d6ca
---
M src/gprs/gb_proxy.c
M src/gprs/gb_proxy_vty.c
M src/gprs/gprs_llc_vty.c
M src/gprs/gprs_sgsn.c
M src/gprs/gtphub.c
M src/gprs/sgsn_cdr.c
6 files changed, 10 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/87/10487/1
diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c
index 8bf3d37..8bb6789 100644
--- a/src/gprs/gb_proxy.c
+++ b/src/gprs/gb_proxy.c
@@ -611,7 +611,7 @@
return 0;
- clock_gettime(CLOCK_MONOTONIC, &ts);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &ts);
now = ts.tv_sec;
gbprox_update_current_raid(parse_ctx.bssgp_raid_enc, peer,
@@ -727,7 +727,7 @@
if (!peer)
return;
- clock_gettime(CLOCK_MONOTONIC, &ts);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &ts);
now = ts.tv_sec;
if (parse_ctx.g48_hdr) {
@@ -1452,7 +1452,7 @@
LOGP(DGPRS, LOGL_ERROR, "Cannot allocate global counter group!\n");
return -1;
}
- clock_gettime(CLOCK_REALTIME, &tp);
+ osmo_clock_gettime(CLOCK_REALTIME, &tp);
return 0;
}
diff --git a/src/gprs/gb_proxy_vty.c b/src/gprs/gb_proxy_vty.c
index ed5613e..52c39fd 100644
--- a/src/gprs/gb_proxy_vty.c
+++ b/src/gprs/gb_proxy_vty.c
@@ -558,7 +558,7 @@
time_t now;
struct timespec ts = {0,};
- clock_gettime(CLOCK_MONOTONIC, &ts);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &ts);
now = ts.tv_sec;
llist_for_each_entry(peer, &g_cfg->bts_peers, list) {
@@ -792,7 +792,7 @@
state = &peer->patch_state;
- clock_gettime(CLOCK_MONOTONIC, &ts);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &ts);
now = ts.tv_sec;
if (match == MATCH_STALE) {
diff --git a/src/gprs/gprs_llc_vty.c b/src/gprs/gprs_llc_vty.c
index 1433efe..418be83 100644
--- a/src/gprs/gprs_llc_vty.c
+++ b/src/gprs/gprs_llc_vty.c
@@ -71,7 +71,7 @@
{
unsigned int i;
struct timespec now_tp = {0};
- clock_gettime(CLOCK_MONOTONIC, &now_tp);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &now_tp);
vty_out(vty, "TLLI %08x (Old TLLI %08x) BVCI=%u NSEI=%u %s: "
"IOV-UI=0x%06x CKSN=%d Age=%d: State %s%s", llme->tlli,
diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c
index 9046157..d8bca85 100644
--- a/src/gprs/gprs_sgsn.c
+++ b/src/gprs/gprs_sgsn.c
@@ -936,7 +936,7 @@
int rc;
- rc = clock_gettime(CLOCK_MONOTONIC, &now_tp);
+ rc = osmo_clock_gettime(CLOCK_MONOTONIC, &now_tp);
OSMO_ASSERT(rc >= 0);
now = now_tp.tv_sec;
diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c
index 4ee20cd..ca5857b 100644
--- a/src/gprs/gtphub.c
+++ b/src/gprs/gtphub.c
@@ -791,7 +791,7 @@
time_t gtphub_now(void)
{
struct timespec now_tp;
- OSMO_ASSERT(clock_gettime(CLOCK_MONOTONIC, &now_tp) >= 0);
+ OSMO_ASSERT(osmo_clock_gettime(CLOCK_MONOTONIC, &now_tp) >= 0);
return now_tp.tv_sec;
}
diff --git a/src/gprs/sgsn_cdr.c b/src/gprs/sgsn_cdr.c
index 7380e74..93ed0af 100644
--- a/src/gprs/sgsn_cdr.c
+++ b/src/gprs/sgsn_cdr.c
@@ -177,7 +177,7 @@
if (pdp->ggsn)
inet_ntop(AF_INET, &pdp->ggsn->gsn->gsnc.s_addr, sgsn_addr, sizeof(sgsn_addr));
- clock_gettime(CLOCK_MONOTONIC, &tp);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &tp);
gettimeofday(&tv, NULL);
/* convert the timestamp to UTC */
@@ -267,7 +267,7 @@
cdr_log_mm(inst, "free", signal_data->mm);
break;
case S_SGSN_PDP_ACT:
- clock_gettime(CLOCK_MONOTONIC, &signal_data->pdp->cdr_start);
+ osmo_clock_gettime(CLOCK_MONOTONIC, &signal_data->pdp->cdr_start);
signal_data->pdp->cdr_charging_id = signal_data->pdp->lib->cid;
cdr_log_pdp(inst, "pdp-act", signal_data->pdp);
osmo_timer_setup(&signal_data->pdp->cdr_timer, cdr_pdp_timeout,
--
To view, visit https://gerrit.osmocom.org/10487
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic638849c6687c376c4c0c36cc286d499a073d6ca
Gerrit-Change-Number: 10487
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/20180817/c13ed100/attachment.htm>