lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

January 2025

  • 1 participants
  • 1491 discussions
[XS] Change in libosmocore[pespin/rel-1.10.0]: osmo_io: iofd_msgb_alloc(): Allow allocating msgb of len=0xffff
by osmith 16 Jan '25

16 Jan '25
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/39350?usp=email ) Change subject: osmo_io: iofd_msgb_alloc(): Allow allocating msgb of len=0xffff ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39350?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: pespin/rel-1.10.0 Gerrit-Change-Id: I6f9125916a301414301587f84fc3db98549a2f3f Gerrit-Change-Number: 39350 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 16 Jan 2025 09:16:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmocore[pespin/rel-1.10.0]: osmo_io: segmentation cb: Initialize null ptr every iteration
by osmith 16 Jan '25

16 Jan '25
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/39349?usp=email ) Change subject: osmo_io: segmentation cb: Initialize null ptr every iteration ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39349?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: pespin/rel-1.10.0 Gerrit-Change-Id: I0fcaa6afb9cf2f88243280f01c278fa2d72e69a6 Gerrit-Change-Number: 39349 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 16 Jan 2025 09:16:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmocore[pespin/rel-1.10.0]: osmo_io: Improve osmo_iofd_notify_connected() documentation
by osmith 16 Jan '25

16 Jan '25
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/39348?usp=email ) Change subject: osmo_io: Improve osmo_iofd_notify_connected() documentation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39348?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: pespin/rel-1.10.0 Gerrit-Change-Id: Ica20a050b98d117995a5b625b23ab9faa61aabee Gerrit-Change-Number: 39348 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 16 Jan 2025 09:15:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmocore[pespin/rel-1.10.0]: gsmtap: Increase txqueue max_length from 64 to 1024
by osmith 16 Jan '25

16 Jan '25
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/39347?usp=email ) Change subject: gsmtap: Increase txqueue max_length from 64 to 1024 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39347?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: pespin/rel-1.10.0 Gerrit-Change-Id: Ie737e1d060ea3ee48631604bbae1b8b84cf787b9 Gerrit-Change-Number: 39347 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 16 Jan 2025 09:15:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmocore[pespin/rel-1.10.0]: osmo_io: Increase default queue max_length from 32 to 1024
by osmith 16 Jan '25

16 Jan '25
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/39346?usp=email ) Change subject: osmo_io: Increase default queue max_length from 32 to 1024 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39346?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: pespin/rel-1.10.0 Gerrit-Change-Id: I92d5369af523f6297d45d4b534bb0f349ae74485 Gerrit-Change-Number: 39346 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 16 Jan 2025 09:15:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmocore[pespin/rel-1.10.0]: gsm48_encode_bearer_cap(): properly set 'Structure' in octet 4
by osmith 16 Jan '25

16 Jan '25
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/39345?usp=email ) Change subject: gsm48_encode_bearer_cap(): properly set 'Structure' in octet 4 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39345?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: pespin/rel-1.10.0 Gerrit-Change-Id: I563becfdae75e22de3b5e5de3c810334a74e7ffb Gerrit-Change-Number: 39345 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 16 Jan 2025 09:15:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-ci[master]: jobs/master-builds: add ot290-gsmtap
by osmith 16 Jan '25

16 Jan '25
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/39334?usp=email ) Change subject: jobs/master-builds: add ot290-gsmtap ...................................................................... jobs/master-builds: add ot290-gsmtap This job didn't have a jenkins job builder config yet and ran without docker on label=osmocom-master-debian10, which we are removing. Related: https://jenkins.osmocom.org/jenkins/job/master-ot290-gsmtap/ Related: OS#6186 Change-Id: Iec1a07896dc2817f7671463ddba438b727f41b5d --- M jobs/master-builds.yml 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index dce4849..4b2259d 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -433,6 +433,10 @@ - osmo-python-tests: repos_url: '{gerrit_url}/python/{repos}' + - ot290-gsmtap: + repos_url: '{gitea_url}/phone-side/{repos}' + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} make -C /build/src' + - pyosmocom: repos_url: '{gerrit_url}/python/{repos}' concurrent: false -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/39334?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iec1a07896dc2817f7671463ddba438b727f41b5d Gerrit-Change-Number: 39334 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-pcap[master]: server: Introduce struct osmo_pcap_wr_file
by pespin 15 Jan '25

15 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcap/+/39353?usp=email ) Change subject: server: Introduce struct osmo_pcap_wr_file ...................................................................... server: Introduce struct osmo_pcap_wr_file This encloses file state and operation, allowing for further improvement later on: * Making non-blocking/async writes * Writing to new file while finishing writes to previous files Change-Id: I5244fbc7a5dc047e1f5f7b77954cbb9c1f610181 --- M include/osmo-pcap/osmo_pcap_server.h M src/osmo_server_core.c M src/osmo_server_network.c 3 files changed, 130 insertions(+), 67 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/53/39353/1 diff --git a/include/osmo-pcap/osmo_pcap_server.h b/include/osmo-pcap/osmo_pcap_server.h index a808bff..9664084 100644 --- a/include/osmo-pcap/osmo_pcap_server.h +++ b/include/osmo-pcap/osmo_pcap_server.h @@ -73,6 +73,21 @@ SERVER_CTR_NOCLIENT, }; +struct osmo_pcap_wr_file { + struct osmo_pcap_conn *conn; /* backpointer */ + /* canonicalized absolute pathname of pcap file we write to */ + char *filename; + /* file descriptor of the file we write to */ + int local_fd; + /* Current write offset of the file we write to (local_fd) */ + off_t wr_offset; +}; +struct osmo_pcap_wr_file *osmo_pcap_wr_file_alloc(struct osmo_pcap_conn *conn); +void osmo_pcap_wr_file_free(struct osmo_pcap_wr_file *wrf); +int osmo_pcap_wr_file_open(struct osmo_pcap_wr_file *wrf, const char *filename, mode_t mode); +void osmo_pcap_wr_file_close(struct osmo_pcap_wr_file *wrf); +int osmo_pcap_wr_file_write(struct osmo_pcap_wr_file *wrf, const uint8_t *data, size_t len); + struct osmo_pcap_conn { /* list of connections */ struct llist_head entry; @@ -86,12 +101,7 @@ /* Remote connection */ struct osmo_stream_srv *srv; - /* canonicalized absolute pathname of pcap file we write to */ - char *curr_filename; - /* file descriptor of the file we write to */ - int local_fd; - /* Current write offset of the file we write to (local_fd) */ - off_t wr_offset; + struct osmo_pcap_wr_file *wrf; /* pcap stuff */ enum osmo_pcap_fmt file_fmt; diff --git a/src/osmo_server_core.c b/src/osmo_server_core.c index 2230cf7..0df36c3 100644 --- a/src/osmo_server_core.c +++ b/src/osmo_server_core.c @@ -116,6 +116,66 @@ 0); } +struct osmo_pcap_wr_file *osmo_pcap_wr_file_alloc(struct osmo_pcap_conn *conn) +{ + struct osmo_pcap_wr_file *wrf = talloc_zero(conn, struct osmo_pcap_wr_file); + OSMO_ASSERT(wrf); + + wrf->conn = conn; + wrf->local_fd = -1; + wrf->wr_offset = 0; + + return wrf; +} + +void osmo_pcap_wr_file_free(struct osmo_pcap_wr_file *wrf) +{ + if (!wrf) + return; + osmo_pcap_wr_file_close(wrf); + talloc_free(wrf); +} + +int osmo_pcap_wr_file_open(struct osmo_pcap_wr_file *wrf, const char *filename, mode_t mode) +{ + int rc; + OSMO_ASSERT(filename); + OSMO_ASSERT(wrf->local_fd == -1); + + rc = open(filename, O_CREAT|O_WRONLY|O_TRUNC, mode); + if (rc < 0) { + LOGP(DSERVER, LOGL_ERROR, "Failed to open file '%s': %s\n", + filename, strerror(errno)); + return rc; + } + wrf->local_fd = rc; + wrf->filename = talloc_strdup(wrf, filename); + OSMO_ASSERT(wrf->filename); + return rc; +} + +void osmo_pcap_wr_file_close(struct osmo_pcap_wr_file *wrf) +{ + if (wrf->local_fd > 0) { + close(wrf->local_fd); + wrf->local_fd = -1; + } +} + +int osmo_pcap_wr_file_write(struct osmo_pcap_wr_file *wrf, const uint8_t *data, size_t len) +{ + int rc = write(wrf->local_fd, data, len); + if (rc >= 0) { + wrf->wr_offset += rc; + if (rc != len) { + LOGP(DSERVER, LOGL_ERROR, "Short write '%s': ret %d != %zu\n", + wrf->filename, rc, len); + return -1; + } + } + return rc; +} + static inline size_t calc_data_max_len(const struct osmo_pcap_server *server) { size_t data_max_len; @@ -207,7 +267,6 @@ /* we never write */ osmo_wqueue_init(&conn->rem_wq, 0); conn->rem_wq.bfd.fd = -1; - conn->local_fd = -1; conn->server = server; llist_add_tail(&conn->entry, &server->conn); return conn; @@ -235,9 +294,9 @@ /* Move pcap file from base_path to completed_path, and updates * conn->curr_filename to point to new location. */ -void move_completed_trace_if_needed(struct osmo_pcap_conn *conn) +void move_completed_trace_if_needed(struct osmo_pcap_wr_file *wrf) { - struct osmo_pcap_server *server = conn->server; + struct osmo_pcap_server *server; char *curr_filename_cpy_bname = NULL; char *curr_filename_cpy_dname = NULL; char *bname = NULL; @@ -247,9 +306,10 @@ size_t new_filename_len; int rc; - if (!conn->curr_filename) + if (!wrf) return; + server = wrf->conn->server; if (!server->completed_path) return; @@ -257,8 +317,8 @@ /* basename and dirname may modify input param, and return a string * which shall not be freed, potentially pointing to the input param. */ - curr_filename_cpy_dname = talloc_strdup(conn, conn->curr_filename); - curr_filename_cpy_bname = talloc_strdup(conn, conn->curr_filename); + curr_filename_cpy_dname = talloc_strdup(wrf, wrf->filename); + curr_filename_cpy_bname = talloc_strdup(wrf, wrf->filename); if (!curr_filename_cpy_dname || !curr_filename_cpy_bname) goto ret_free1; @@ -266,7 +326,7 @@ bname = basename(curr_filename_cpy_bname); if (!curr_dirname || !bname) { LOGP(DSERVER, LOGL_ERROR, "Failed to resolve dirname and basename for '%s'\n", - conn->curr_filename); + wrf->filename); goto ret_free1; } @@ -278,28 +338,28 @@ } new_filename_len = strlen(new_dirname) + 1 /* '/' */ + strlen(bname) + 1 /* '\0' */; - new_filename = talloc_size(conn, new_filename_len); + new_filename = talloc_size(wrf, new_filename_len); if (!new_filename) goto ret_free1; rc = snprintf(new_filename, new_filename_len, "%s/%s", new_dirname, bname); if (rc != new_filename_len - 1) goto ret_free2; - LOGP(DSERVER, LOGL_INFO, "Moving completed pcap file '%s' -> '%s'\n", conn->curr_filename, new_filename); - rc = rename(conn->curr_filename, new_filename); + LOGP(DSERVER, LOGL_INFO, "Moving completed pcap file '%s' -> '%s'\n", wrf->filename, new_filename); + rc = rename(wrf->filename, new_filename); if (rc == -1) { int err = errno; LOGP(DSERVER, LOGL_ERROR, "Failed moving completed pcap file '%s' -> '%s': %s\n", - conn->curr_filename, new_filename, strerror(err)); + wrf->filename, new_filename, strerror(err)); if (err == EXDEV) LOGP(DSERVER, LOGL_ERROR, "Fix your config! %s and %s shall not be in different filesystems!\n", curr_dirname, new_dirname); goto ret_free2; } - /* Now replace conn->curr_filename with new path: */ - talloc_free(conn->curr_filename); - conn->curr_filename = new_filename; + /* Now replace wrf->filename with new path: */ + talloc_free(wrf->filename); + wrf->filename = new_filename; /* new_filename has been assigned, so we don't want to free it, hence move to ret_free1: */ goto ret_free1; @@ -311,27 +371,21 @@ talloc_free(curr_filename_cpy_dname); } -static void close_local_fd(struct osmo_pcap_conn *conn) -{ - close(conn->local_fd); - conn->local_fd = -1; - conn->wr_offset = 0; -} - void osmo_pcap_conn_close_trace(struct osmo_pcap_conn *conn) { - if (conn->local_fd >= 0) - close_local_fd(conn); + if (!conn->wrf) + return; - move_completed_trace_if_needed(conn); + osmo_pcap_wr_file_close(conn->wrf); - if (conn->curr_filename) { - osmo_pcap_conn_event(conn, "closingtracefile", conn->curr_filename); - rate_ctr_inc2(conn->ctrg, PEER_CTR_PROTATE); - rate_ctr_inc2(conn->server->ctrg, SERVER_CTR_PROTATE); - talloc_free(conn->curr_filename); - conn->curr_filename = NULL; - } + move_completed_trace_if_needed(conn->wrf); + + osmo_pcap_conn_event(conn, "closingtracefile", conn->wrf->filename); + rate_ctr_inc2(conn->ctrg, PEER_CTR_PROTATE); + rate_ctr_inc2(conn->server->ctrg, SERVER_CTR_PROTATE); + + osmo_pcap_wr_file_free(conn->wrf); + conn->wrf = NULL; } void osmo_pcap_conn_close(struct osmo_pcap_conn *conn) @@ -358,7 +412,7 @@ /* Update conn->last_write if needed. This field is used to keep the last time * period where we wrote to the pcap file. Once a new write period (based on * rotation VTY config) is detected, the pcap file we write to is rotated. */ -static void update_last_write(struct osmo_pcap_conn *conn, time_t now, size_t len) +static void update_last_write(struct osmo_pcap_conn *conn, time_t now) { time_t last = mktime(&conn->last_write); @@ -368,8 +422,6 @@ * using the current one. */ if (now > last) localtime_r(&now, &conn->last_write); - - conn->wr_offset += len; } void osmo_pcap_conn_restart_trace(struct osmo_pcap_conn *conn) @@ -377,15 +429,16 @@ time_t now = time(NULL); struct tm tm; int rc; - char *real_base_path; + char *real_base_path, *curr_filename; osmo_pcap_conn_close_trace(conn); /* omit any storing/creation of the file */ if (!conn->store) { - update_last_write(conn, now, 0); - talloc_free(conn->curr_filename); - conn->curr_filename = NULL; + update_last_write(conn, now); + /* TODO: Once we support async write, we'll want to schedule close here instead of freeing: */ + osmo_pcap_wr_file_free(conn->wrf); + conn->wrf = NULL; return; } @@ -396,32 +449,31 @@ conn->server->base_path, strerror(errno)); return; } - conn->curr_filename = talloc_asprintf(conn, "%s/trace-%s-%d%.2d%.2d_%.2d%.2d%.2d.%s", - real_base_path, conn->name, - tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, - tm.tm_hour, tm.tm_min, tm.tm_sec, - conn->file_fmt == OSMO_PCAP_FMT_PCAP ? "pcap" : "pcapng"); + curr_filename = talloc_asprintf(conn, "%s/trace-%s-%d%.2d%.2d_%.2d%.2d%.2d.%s", + real_base_path, conn->name, + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec, + conn->file_fmt == OSMO_PCAP_FMT_PCAP ? "pcap" : "pcapng"); free(real_base_path); - if (!conn->curr_filename) { + if (!curr_filename) { LOGP(DSERVER, LOGL_ERROR, "Failed to assemble filename for %s.\n", conn->name); return; } - conn->local_fd = creat(conn->curr_filename, conn->server->permission_mask); - if (conn->local_fd < 0) { - LOGP(DSERVER, LOGL_ERROR, "Failed to create file '%s': %s\n", - conn->curr_filename, strerror(errno)); + conn->wrf = osmo_pcap_wr_file_alloc(conn); + rc = osmo_pcap_wr_file_open(conn->wrf, curr_filename, conn->server->permission_mask); + talloc_free(curr_filename); + if (rc < 0) return; - } - conn->wr_offset = 0; - rc = write(conn->local_fd, conn->file_hdr, conn->file_hdr_len); + rc = osmo_pcap_wr_file_write(conn->wrf, conn->file_hdr, conn->file_hdr_len); if (rc != conn->file_hdr_len) { LOGP(DSERVER, LOGL_ERROR, "Failed to write the header: %d\n", errno); - close_local_fd(conn); + osmo_pcap_wr_file_free(conn->wrf); + conn->wrf = NULL; return; } - update_last_write(conn, now, rc); + update_last_write(conn, now); } void osmo_pcap_server_reopen(struct osmo_pcap_server *server) @@ -442,9 +494,10 @@ /* Returns true if pcap was re-opened */ static bool check_restart_pcap_max_size(struct osmo_pcap_conn *conn, size_t data_len) { + OSMO_ASSERT(conn->wrf); if (!pcap_server->max_size_enabled) return false; - if (conn->wr_offset + data_len <= conn->server->max_size) + if (conn->wrf->wr_offset + data_len <= conn->server->max_size) return false; LOGP(DSERVER, LOGL_NOTICE, "Rolling over file for %s (max-size)\n", conn->name); @@ -584,11 +637,11 @@ zmq_send_client_data(conn, data, len); if (!conn->store) { - update_last_write(conn, now, 0); + update_last_write(conn, now); return 0; } - if (conn->local_fd < -1) { + if (!conn->wrf) { LOGP(DSERVER, LOGL_ERROR, "No file is open. close connection.\n"); return -1; } @@ -597,12 +650,12 @@ if (!check_restart_pcap_max_size(conn, len)) check_restart_pcap_localtime(conn, now); - rc = write(conn->local_fd, data, len); - if (rc != len) { - LOGP(DSERVER, LOGL_ERROR, "Failed to write for %s\n", conn->name); + rc = osmo_pcap_wr_file_write(conn->wrf, data, len); + if (rc < 0) { + LOGP(DSERVER, LOGL_ERROR, "%s: Failed writing to file\n", conn->name); return -1; } - update_last_write(conn, now, rc); + update_last_write(conn, now); return 0; } diff --git a/src/osmo_server_network.c b/src/osmo_server_network.c index e6bd67b..11f92fc 100644 --- a/src/osmo_server_network.c +++ b/src/osmo_server_network.c @@ -146,7 +146,7 @@ if ((rc = validate_link_hdr(conn, data)) < 0) return rc; - if (conn->store && conn->local_fd < 0) { + if (conn->store && !conn->wrf) { /* First received link hdr in conn */ talloc_free(conn->file_hdr); conn->file_hdr = talloc_size(conn, data->len); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/39353?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Change-Id: I5244fbc7a5dc047e1f5f7b77954cbb9c1f610181 Gerrit-Change-Number: 39353 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-mgw[master]: mgw: MDCX: Split mgcp header pars parsing into a previous step
by pespin 15 Jan '25

15 Jan '25
Attention is currently required from: daniel, neels. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39239?usp=email ) Change subject: mgw: MDCX: Split mgcp header pars parsing into a previous step ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39239?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I6ecb41fc2cc737c3a161b6bc98bd08ae01909655 Gerrit-Change-Number: 39239 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: daniel <dwillmann(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Jan 2025 17:59:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in osmo-mgw[master]: mgw: CRCX: Split mgcp header pars parsing into a previous step
by pespin 15 Jan '25

15 Jan '25
Attention is currently required from: daniel, laforge, neels. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39224?usp=email ) Change subject: mgw: CRCX: Split mgcp header pars parsing into a previous step ...................................................................... Patch Set 5: (1 comment) File src/libosmo-mgcp/mgcp_msg.c: https://gerrit.osmocom.org/c/osmo-mgw/+/39224/comment/cac18ada_41188f4c?usp… : PS4, Line 257: LOGP(DLMGCP, LOGL_NOTICE, "wrong MGCP option format: '%s'\n", line); > See for instance in mgcp_client. […] I submitted https://gerrit.osmocom.org/c/osmo-mgw/+/39352 as a follow-up patch readding enpoint name to the log line by moving the logging further up in the stack. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39224?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I3ee5158c254213203830fe9c38de11c15b4b19c1 Gerrit-Change-Number: 39224 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Jan 2025 17:55:51 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • ...
  • 150
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.