Eina Log: don't remove a domain from env var list on the first register
authorbdilly <bdilly@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 5 Jul 2012 21:06:05 +0000 (21:06 +0000)
committerbdilly <bdilly@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 5 Jul 2012 21:06:05 +0000 (21:06 +0000)
Let say you pass a log level 4 for a domain on env var.

So if you, for some reason, register a domain, unregister it, and register
it again, the log level will be set as 1 instead of 4.
And you'll miss info and debug msgs...

Now only remove this information when cleaning pending list,
on eina_log_shutdown().

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@73380 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eina_log.c

index 5eb3eb3..2373823 100644 (file)
@@ -1138,9 +1138,6 @@ finish_register:
       if ((namelen == pending->namelen) && (strcmp(pending->name, name) == 0))
         {
            _log_domains[i].level = pending->level;
-           _pending_list =
-              eina_inlist_remove(_pending_list, EINA_INLIST_GET(pending));
-           free(pending);
            break;
         }
    }