[PATCH] libosmocore[master]: Remove direct logging

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/.

Max gerrit-no-reply at lists.osmocom.org
Wed Jan 4 18:57:14 UTC 2017


Review at  https://gerrit.osmocom.org/1533

Remove direct logging

Drop perror() calls from GSMTAP code: it's application job to do the
proper logging - library code should not write to stdout/stderr
directly.

Change-Id: Ifa149e65d76c6e64fda2946725c16672233aff2e
---
M src/gsmtap_util.c
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/1533/1

diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c
index 66abdf1..ab4a28e 100644
--- a/src/gsmtap_util.c
+++ b/src/gsmtap_util.c
@@ -286,11 +286,9 @@
 
 	rc = write(ofd->fd, msg->data, msg->len);
 	if (rc < 0) {
-		perror("writing msgb to gsmtap fd");
 		return rc;
 	}
 	if (rc != msg->len) {
-		perror("short write to gsmtap fd");
 		return -EIO;
 	}
 
@@ -308,7 +306,6 @@
 
 	rc = read(fd->fd, buf, sizeof(buf));
 	if (rc < 0) {
-		perror("reading from gsmtap sink fd");
 		return rc;
 	}
 	/* simply discard any data arriving on the socket */

-- 
To view, visit https://gerrit.osmocom.org/1533
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa149e65d76c6e64fda2946725c16672233aff2e
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list