summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-12-22 05:57:42 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-12-26 20:52:18 +0000
commit684fa75b4926bf9f0ce31e353357fd937fd49c38 (patch)
tree4105f62fa032ca0cce2454f1b11a6d3fd6c47e4b
parentd83716d315a2d6fdf937a8678f53ecf890102e02 (diff)
layer23/sap_interface.c: use LOGP() instead of fprintf()
-rw-r--r--src/host/layer23/src/common/sap_interface.c6
1 files changed, 3 insertions, 3 deletions
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 @@ static int sap_read(struct osmo_fd *fd)
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;