From f5d9f5ec35c443511e5d9279b9d61da033ec32ad Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 15 Jan 2008 14:43:40 +0000 Subject: [PATCH] removing old, unused code git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1213 9efc2488-bf62-4759-914b-345cdb29e865 --- src/libopensrf/component.c | 52 ---------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 src/libopensrf/component.c diff --git a/src/libopensrf/component.c b/src/libopensrf/component.c deleted file mode 100644 index c63dd44..0000000 --- a/src/libopensrf/component.c +++ /dev/null @@ -1,52 +0,0 @@ -#include -#include "signal.h" - - -/* -void print_stuff(void* blah, char* data) { - fprintf(stderr, "Received from socket: %s\n", data); -} -*/ - -/* connects and registers with the router */ -int main( int argc, char** argv ) { - - - - if( argc < 5 ) { - osrfLogError(OSRF_LOG_MARK, "Usage: %s ", argv[0] ); - return -1; - } - - int port = atoi(argv[2]); - transport_client* client = client_init( argv[1], port, 1 ); - - // try to connect, allow 15 second connect timeout - if( client_connect( client, argv[3], argv[4], "", 15, 1 ) ) - osrfLogInfo(OSRF_LOG_MARK, "Connected...\n"); - else { - osrfLogError(OSRF_LOG_MARK, "NOT Connected...\n" ); - return -1; - } - - transport_message* recv; - while( (recv=client_recv( client, -1)) ) { - if( recv->is_error ) - fprintf( stderr, "\nReceived Error\t: ------------------\nFrom:\t\t" - "%s\nRouterFrom:\t%s\nBody:\t\t%s\nType %s\nCode %d\n=> ", - recv->sender, recv->router_from, recv->body, recv->error_type, recv->error_code ); - else - fprintf( stderr, "\nReceived\t: ------------------\nFrom:\t\t" - "%s\nRouterFrom:\t%s\nBody:\t\t%s\n=> ", recv->sender, recv->router_from, recv->body ); - transport_message* send = message_init( "Hello...", "", "123454321", recv->sender, argv[3] ); - client_send_message( client, send ); - message_free( recv ); - message_free( send ); - } - return 0; - -} - - - - -- 2.11.0