From eab20964b2f059898fc804584e55a157c021afc0 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 21 Jan 2011 18:00:36 +0100 Subject: udp: Make the SNMP code asynchronous Do not block the application when doing a SNMP request. Work with the results coming back from the callback. Right now a link can only be taken down and up. --- src/links.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/links.c') diff --git a/src/links.c b/src/links.c index bf282b6..4342447 100644 --- a/src/links.c +++ b/src/links.c @@ -126,12 +126,7 @@ int link_init(struct bsc_data *bsc) LOGP(DINP, LOGL_NOTICE, "Using UDP MTP mode.\n"); - /* setup SNMP first, it is blocking */ - bsc->udp_data.session = snmp_mtp_session_create(bsc->udp_ip); - if (!bsc->udp_data.session) - return -1; - - if (link_global_init(&bsc->udp_data, bsc->src_port) != 0) + if (link_global_init(&bsc->udp_data, bsc->udp_ip, bsc->src_port) != 0) return -1; /* now connect to the transport */ -- cgit v1.2.3