~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/erl_interface/test/ei_connect_SUITE_data/ei_connect_test.c

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * %CopyrightBegin%
3
3
 * 
4
 
 * Copyright Ericsson AB 2001-2009. All Rights Reserved.
 
4
 * Copyright Ericsson AB 2001-2011. All Rights Reserved.
5
5
 * 
6
6
 * The contents of this file are subject to the Erlang Public License,
7
7
 * Version 1.1, (the "License"); you may not use this file except in
35
35
static void cmd_ei_connect_init(char* buf, int len);
36
36
static void cmd_ei_connect(char* buf, int len);
37
37
static void cmd_ei_send(char* buf, int len);
 
38
static void cmd_ei_format_pid(char* buf, int len);
38
39
static void cmd_ei_send_funs(char* buf, int len);
39
40
static void cmd_ei_reg_send(char* buf, int len);
40
41
static void cmd_ei_rpc(char* buf, int len);
57
58
    "ei_reg_send",           3, cmd_ei_reg_send,
58
59
    "ei_rpc",                4, cmd_ei_rpc,
59
60
    "ei_set_get_tracelevel", 1, cmd_ei_set_get_tracelevel,
 
61
    "ei_format_pid",         2, cmd_ei_format_pid,
60
62
};
61
63
 
62
64
 
111
113
    ei_x_buff res;
112
114
    if (ei_decode_long(buf, &index, &l) < 0)
113
115
        fail("expected int");
114
 
    sprintf(b, "c%d", l);
 
116
    sprintf(b, "c%ld", l);
115
117
    /* FIXME don't use internal and maybe use skip?! */
116
118
    ei_get_type_internal(buf, &index, &type, &size);
117
119
    if (ei_decode_atom(buf, &index, cookie) < 0)
183
185
    ei_x_free(&x);
184
186
}
185
187
 
 
188
static void cmd_ei_format_pid(char* buf, int len)
 
189
{
 
190
    int index = 0;
 
191
    long fd;
 
192
    erlang_pid pid;
 
193
    ei_x_buff x;
 
194
 
 
195
    if (ei_decode_long(buf, &index, &fd) < 0)
 
196
        fail("expected long");
 
197
    if (ei_decode_pid(buf, &index, &pid) < 0)
 
198
        fail("expected pid (node)");
 
199
    if (ei_x_new_with_version(&x) < 0)
 
200
        fail("ei_x_new_with_version");
 
201
    if (ei_x_format_wo_ver(&x, "~p", &pid) < 0)
 
202
        fail("ei_x_format_wo_ver");
 
203
    send_errno_result(ei_send(fd, &pid, x.buff, x.index));
 
204
    ei_x_free(&x);
 
205
}
 
206
 
186
207
static void cmd_ei_send_funs(char* buf, int len)
187
208
{
188
209
    int index = 0, n;