[PATCH 1/3] gtp.c: improve an error log.

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/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Mon Oct 12 00:54:33 UTC 2015


It would print the memory location of the address buffer. Instead, print the
first few hex values of the address buffer.
---
 gtp/gtp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtp/gtp.c b/gtp/gtp.c
index cfce244..90e0326 100644
--- a/gtp/gtp.c
+++ b/gtp/gtp.c
@@ -741,7 +741,7 @@ int gtp_new(struct gsn_t **gsn, char *statedir, struct in_addr *listen,
 		(*gsn)->err_socket++;
 		LOGP(DLGTP, LOGL_ERROR,
 			"bind(fd0=%d, addr=%lx, len=%d) failed: Error = %s\n",
-			(*gsn)->fd0, (unsigned long)&addr, sizeof(addr),
+			(*gsn)->fd0, *((unsigned long*)&addr), sizeof(addr),
 			strerror(errno));
 		return -1;
 	}
-- 
2.1.4




More information about the OpenBSC mailing list