Change in osmocom-bb[master]: layer23/sap_interface.c: use LOGP() instead of fprintf()

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

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Mon Dec 24 22:09:21 UTC 2018


Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/12435


Change subject: layer23/sap_interface.c: use LOGP() instead of fprintf()
......................................................................

layer23/sap_interface.c: use LOGP() instead of fprintf()

Change-Id: I054be24666fcd5eb8a70cfcac0e7ed566e909b90
---
M src/host/layer23/src/common/sap_interface.c
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/35/12435/1

diff --git a/src/host/layer23/src/common/sap_interface.c b/src/host/layer23/src/common/sap_interface.c
index 0d42209..dd7737a 100644
--- a/src/host/layer23/src/common/sap_interface.c
+++ b/src/host/layer23/src/common/sap_interface.c
@@ -380,19 +380,19 @@
 
 	sap_buffer = talloc_zero_size(NULL, ms->sap_entity.max_msg_size);
 	if(!sap_buffer){
-		fprintf(stderr, "Failed to allocate memory\n");
+		LOGP(DSAP, LOGL_ERROR, "Failed to allocate memory\n");
 		return -ENOMEM;
 	}
 
 	rc = read(fd->fd, sap_buffer, ms->sap_entity.max_msg_size - 1);
 	if (rc < 0) {
-		fprintf(stderr, "SAP socket failed\n");
+		LOGP(DSAP, LOGL_ERROR,"SAP socket failed\n");
 		msgb_free(msg);
 		sap_close(ms);
 		return rc;
 	}
 	if(rc == 0) {
-		fprintf(stderr, "SAP socket closed by server\n");
+		LOGP(DSAP, LOGL_NOTICE, "SAP socket closed by server\n");
 		msgb_free(msg);
 		sap_close(ms);
 		return -ECONNREFUSED;

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I054be24666fcd5eb8a70cfcac0e7ed566e909b90
Gerrit-Change-Number: 12435
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181224/3dcd2d27/attachment.htm>


More information about the gerrit-log mailing list