From 89582f7e77068bc38fa9ee391f5c898913f241a7 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 1 Jul 2013 10:51:26 +0200 Subject: sysmobts: Add a method to free cached epprom resources Close the cached file descriptor once the calibration data is loaded and applied. --- src/osmo-bts-sysmo/eeprom.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/osmo-bts-sysmo/eeprom.c') diff --git a/src/osmo-bts-sysmo/eeprom.c b/src/osmo-bts-sysmo/eeprom.c index 272d41a0..e3b94fc3 100644 --- a/src/osmo-bts-sysmo/eeprom.c +++ b/src/osmo-bts-sysmo/eeprom.c @@ -1323,6 +1323,13 @@ int eeprom_dump( int addr, int size, int hex ) static FILE *g_file; +void eeprom_free_resources(void) +{ + if (g_file) + fclose(g_file); + g_file = NULL; +} + /** * Read up to 'size' bytes of data from the EEPROM starting at offset 'addr'. */ -- cgit v1.2.3