forked from enlightenment/efl
ecore_con - Fix binary buffer when using ECORE_CON_REMOTE_UDP.
ERR<7807>: lib/eina/eina_binbuf_template_c.x:95 eina_binbuf_append_length() *** Eina Magic Check Failed !!! This fix a problem where eina_binbuf was used without calling eina_binbuf_new when ECORE_CON_REMOTE_UDP is used.
This commit is contained in:
parent
d31f21a288
commit
503e7a5b03
|
@ -799,7 +799,9 @@ ecore_con_client_send(Ecore_Con_Client *cl,
|
||||||
if (cl->host_server && ((cl->host_server->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_UDP))
|
if (cl->host_server && ((cl->host_server->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_UDP))
|
||||||
sendto(cl->host_server->fd, data, size, 0, (struct sockaddr *)cl->client_addr,
|
sendto(cl->host_server->fd, data, size, 0, (struct sockaddr *)cl->client_addr,
|
||||||
cl->client_addr_len);
|
cl->client_addr_len);
|
||||||
else if (!cl->buf)
|
else
|
||||||
|
{
|
||||||
|
if (!cl->buf)
|
||||||
{
|
{
|
||||||
cl->buf = eina_binbuf_new();
|
cl->buf = eina_binbuf_new();
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(cl->buf, 0);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(cl->buf, 0);
|
||||||
|
@ -814,7 +816,7 @@ ecore_con_client_send(Ecore_Con_Client *cl,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
eina_binbuf_append_length(cl->buf, data, size);
|
eina_binbuf_append_length(cl->buf, data, size);
|
||||||
|
}
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue