Enlightenment CVS committal Author : sebastid Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_con Modified Files: ecore_con_dns.c ecore_con_private.h Log Message: return initcount on init and shutdown =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/ecore_con_dns.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- ecore_con_dns.c 7 Sep 2005 08:24:12 -0000 1.19 +++ ecore_con_dns.c 7 Sep 2005 08:30:51 -0000 1.20 @@ -109,14 +109,13 @@ char *p, *p2; int ret; - dns_init++; - if (dns_init > 1) return 1; + if (++dns_init > 1) return dns_init; memset(servers, 0, sizeof(servers)); server_count = 0; file = fopen("/etc/resolv.conf", "rb"); - if (!file) return 0; + if (!file) return --dns_init; while (fgets(buf, sizeof(buf), file)) { if (strlen(buf) >= 1023) @@ -217,18 +216,18 @@ } } } - - return 1; + + printf("init: %d\n", dns_init); + return dns_init; } -void +int ecore_con_dns_shutdown(void) { Ecore_List2 *l; int i; - dns_init--; - if (dns_init > 0) return; + if (--dns_init > 0) return dns_init; for (l = (Ecore_List2 *)dns_cache; l;) { @@ -248,6 +247,9 @@ for (i = 0; i < search_count; i++) free(search[i]); search_count = 0; + + printf("shutdown: %d\n", dns_init); + return dns_init; } int =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/ecore_con_private.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- ecore_con_private.h 5 Sep 2005 10:17:08 -0000 1.10 +++ ecore_con_private.h 7 Sep 2005 08:30:51 -0000 1.11 @@ -88,5 +88,5 @@ /* from ecore_con_dns.c */ int ecore_con_dns_init(void); -void ecore_con_dns_shutdown(void); +int ecore_con_dns_shutdown(void); #endif ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs