X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test%2Fblackbox%2Ftest_case_channel_conn_08%2Fnode_sim_relay.c;fp=test%2Fblackbox%2Ftest_case_channel_conn_08%2Fnode_sim_relay.c;h=0000000000000000000000000000000000000000;hb=2d38bcd7378c1237d95e9465f2b0dab74453f456;hp=8e5e66ec9eb14e7e0b397f476a29ed05e70a4456;hpb=196b0da2cb6b4973c4d92afecb0b481c560d36a5;p=meshlink-tiny diff --git a/test/blackbox/test_case_channel_conn_08/node_sim_relay.c b/test/blackbox/test_case_channel_conn_08/node_sim_relay.c deleted file mode 100644 index 8e5e66e..0000000 --- a/test/blackbox/test_case_channel_conn_08/node_sim_relay.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - node_sim_relay.c -- Implementation of Node Simulation for Meshlink Testing - for meta connection test case 01 - re-connection of - two nodes when relay node goes down - Copyright (C) 2018 Guus Sliepen - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -#include -#include -#include "../common/common_handlers.h" -#include "../common/test_step.h" -#include "../common/mesh_event_handler.h" - -#define CMD_LINE_ARG_NODENAME 1 -#define CMD_LINE_ARG_DEVCLASS 2 -#define CMD_LINE_ARG_CLIENTID 3 -#define CMD_LINE_ARG_IMPORTSTR 4 -#define CMD_LINE_ARG_INVITEURL 5 - -int main(int argc, char *argv[]) { - (void)argc; - - struct timeval main_loop_wait = { 5, 0 }; - - // Setup required signals - - setup_signals(); - - // Run relay node instance - - meshlink_handle_t *mesh = meshlink_open("testconf", argv[CMD_LINE_ARG_NODENAME], - "test_channel_conn", atoi(argv[CMD_LINE_ARG_DEVCLASS])); - assert(mesh); - meshlink_set_log_cb(mesh, MESHLINK_DEBUG, meshlink_callback_logger); - - assert(meshlink_start(mesh)); - - /* All test steps executed - wait for signals to stop/start or close the mesh */ - while(test_running) { - select(1, NULL, NULL, NULL, &main_loop_wait); - } - - meshlink_close(mesh); - - return 0; -}