efl debugd - fix evlog writing - dont duplicate empty blocks

This commit is contained in:
Carsten Haitzler 2015-05-10 22:42:35 +09:00
parent 6c99fb6c92
commit db6a1af45e
1 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ _do(Client *c, char *op, unsigned char *d, int size)
send_cli(c2->client, "EVON", NULL, 0);
c2->evlog_fetch_timer = ecore_timer_add(0.2, _cb_evlog, c2);
snprintf(buf, sizeof(buf), "%s/efl_debug_evlog-%i.log",
getenv("HOME"), c->pid);
getenv("HOME"), c2->pid);
c2->evlog_file = fopen(buf, "w");
}
}
@ -147,7 +147,7 @@ _do(Client *c, char *op, unsigned char *d, int size)
unsigned char *p = d + 4;
Eina_Evlog_Item hitem;
if (c->evlog_file)
if ((c->evlog_file) && (end > p))
{
hitem.tim = 0.0;
hitem.srctim = 0.0;