snmp/snmp_agentx.patch

Sat, 24 Mar 2012 21:40:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 24 Mar 2012 21:40:49 +0100
changeset 414
fd611cde817f
permissions
-rw-r--r--

Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.

michael@384 1 diff Nau agent/snmp_agent.c.orig agent/snmp_agent.c
michael@384 2 Index: agent/snmp_agent.c
michael@384 3 --- agent/snmp_agent.c.orig
michael@384 4 +++ agent/snmp_agent.c
michael@384 5 @@ -1535,38 +1535,42 @@ int
michael@384 6 netsnmp_remove_delegated_requests_for_session(netsnmp_session *sess)
michael@384 7 {
michael@384 8 netsnmp_agent_session *asp;
michael@384 9 - int count = 0;
michael@384 10 -
michael@384 11 - for (asp = agent_delegated_list; asp; asp = asp->next) {
michael@384 12 - /*
michael@384 13 - * check each request
michael@384 14 - */
michael@384 15 - netsnmp_request_info *request;
michael@384 16 - for(request = asp->requests; request; request = request->next) {
michael@384 17 - /*
michael@384 18 - * check session
michael@384 19 - */
michael@384 20 - netsnmp_assert(NULL!=request->subtree);
michael@384 21 - if(request->subtree->session != sess)
michael@384 22 - continue;
michael@384 23 + int count;
michael@384 24
michael@384 25 + do {
michael@384 26 + count = 0;
michael@384 27 + for (asp = agent_delegated_list; asp; asp = asp->next) {
michael@384 28 /*
michael@384 29 - * matched! mark request as done
michael@384 30 + * check each request
michael@384 31 */
michael@384 32 - netsnmp_request_set_error(request, SNMP_ERR_GENERR);
michael@384 33 - ++count;
michael@384 34 + netsnmp_request_info *request;
michael@384 35 + for(request = asp->requests; request; request = request->next) {
michael@384 36 + /*
michael@384 37 + * check session
michael@384 38 + */
michael@384 39 + netsnmp_assert(NULL!=request->subtree);
michael@384 40 + if(request->subtree->session != sess)
michael@384 41 + continue;
michael@384 42 +
michael@384 43 + /*
michael@384 44 + * matched! mark request as done
michael@384 45 + */
michael@384 46 + netsnmp_request_set_error(request, SNMP_ERR_GENERR);
michael@384 47 + ++count;
michael@384 48 + }
michael@384 49 }
michael@384 50 - }
michael@384 51
michael@384 52 - /*
michael@384 53 - * if we found any, that request may be finished now
michael@384 54 - */
michael@384 55 - if(count) {
michael@384 56 - DEBUGMSGTL(("snmp_agent", "removed %d delegated request(s) for session "
michael@384 57 - "%8p\n", count, sess));
michael@384 58 - netsnmp_check_outstanding_agent_requests();
michael@384 59 - }
michael@384 60 -
michael@384 61 + /*
michael@384 62 + * if we found any, that request may be finished now
michael@384 63 + */
michael@384 64 + if(count) {
michael@384 65 + DEBUGMSGTL(("snmp_agent", "removed %d delegated request(s) for session "
michael@384 66 + "%8p\n", count, sess));
michael@384 67 + netsnmp_check_outstanding_agent_requests();
michael@384 68 + /* the request may get delegated if it was GETNEXT, retry the loop */
michael@384 69 + }
michael@384 70 + } while (count);
michael@384 71 +
michael@384 72 return count;
michael@384 73 }
michael@384 74

mercurial