Tue, 28 Aug 2012 18:28:45 +0200
Massively update from 5.1 to 5.5 release, completely changing from
autotools to cmake build configuration along with the corresponding
corrections. Correct some less important problems like typical german
english mistakes, as well as use parallel make for faster builds with
SMP and multicore architectures. Warning, the 5.5 releases of MySQL
seem to be equally bug ridden as the 5.1 are, for example building
the NDBCluster storage engine fails.
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 |