From 2822296ddb22389c5b4e9b8fb6ef7c906ff99314 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 18 Feb 2011 20:37:04 +0100 Subject: LOGGING: configure logging from the vty We can now configure logging to (multiple) files, stderr and syslog from the vty command line in a persistent way (config file) --- src/utils.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index 49c210e0..354fce57 100644 --- a/src/utils.c +++ b/src/utils.c @@ -134,3 +134,25 @@ char *hexdump_nospc(const unsigned char *buf, int len) { return _hexdump(buf, len, ""); } + +#include "../config.h" +#ifdef HAVE_CTYPE_H +#include +void osmo_str2lower(char *out, const char *in) +{ + unsigned int i; + + for (i = 0; i < strlen(in); i++) + out[i] = tolower(in[i]); + out[strlen(in)] = '\0'; +} + +void osmo_str2upper(char *out, const char *in) +{ + unsigned int i; + + for (i = 0; i < strlen(in); i++) + out[i] = toupper(in[i]); + out[strlen(in)] = '\0'; +} +#endif /* HAVE_CTYPE_H */ -- cgit v1.2.3