Skip to content

Commit

Permalink
erlang: fix build on squeeze and precise
Browse files Browse the repository at this point in the history
Check if defined decode of unicode atoms type.

(cherry picked from commit 63127b2)
  • Loading branch information
seudin authored and linuxmaniac committed May 29, 2015
1 parent 6bb3aed commit 3a9c549
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 10 additions & 1 deletion modules/erlang/handle_emsg.c
Expand Up @@ -460,9 +460,13 @@ int handle_rex_call(cnode_handler_t *phandler,erlang_ref_ex_t *ref, erlang_pid *
*/

ei_get_type(request->buff,&request->index,&type,&size);

#ifdef ERL_SMALL_ATOM_EXT
if (type == ERL_ATOM_EXT || type == ERL_SMALL_ATOM_EXT)
{
#else
if (type == ERL_ATOM_EXT)
{
#endif
if (ei_decode_atom(request->buff,&request->index,module))
{
encode_error_msg(response, ref, "error", "Failed to decode module name");
Expand All @@ -477,8 +481,13 @@ int handle_rex_call(cnode_handler_t *phandler,erlang_ref_ex_t *ref, erlang_pid *

ei_get_type(request->buff,&request->index,&type,&size);

#ifdef ERL_SMALL_ATOM_EXT
if (type == ERL_ATOM_EXT || type == ERL_SMALL_ATOM_EXT)
{
#else
if (type == ERL_ATOM_EXT)
{
#endif
if (ei_decode_atom(request->buff,&request->index,method))
{
encode_error_msg(response, ref, "error", "Failed to decode method name");
Expand Down
4 changes: 3 additions & 1 deletion modules/erlang/pv_xbuff.c
Expand Up @@ -977,7 +977,9 @@ int xavp_decode(ei_x_buff *xbuff, int *index, sr_xavp_t **xavp,int level)

switch (type) {
case ERL_ATOM_EXT:

#ifdef ERL_SMALL_ATOM_EXT
case ERL_SMALL_ATOM_EXT:
#endif
name.len = snprintf(_s,sizeof(_s),"a%d",counter++);
pbuf = (char*)pkg_realloc(pbuf,size+1);

Expand Down

0 comments on commit 3a9c549

Please sign in to comment.