From 367b27999fb3696aa6017911bbac6392254674d4 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 1 Nov 2008 15:36:42 +0000 Subject: [PATCH] - outdated Changed files: net-snmp-duplicate-ip.patch -> 1.3 --- net-snmp-duplicate-ip.patch | 115 ------------------------------------ 1 file changed, 115 deletions(-) delete mode 100644 net-snmp-duplicate-ip.patch diff --git a/net-snmp-duplicate-ip.patch b/net-snmp-duplicate-ip.patch deleted file mode 100644 index eb38a82..0000000 --- a/net-snmp-duplicate-ip.patch +++ /dev/null @@ -1,115 +0,0 @@ -borrowed from: - - http://net-snmp.svn.sourceforge.net/viewvc/net-snmp?view=rev&revision=16804 - ---- branches/V5-4-patches/net-snmp/snmplib/container.c 2008/02/13 23:11:48 16803 -+++ branches/V5-4-patches/net-snmp/snmplib/container.c 2008/02/13 23:37:48 16804 -@@ -268,25 +268,35 @@ - * These functions should EXACTLY match the inline version in - * container.h. If you change one, change them both. - */ --int CONTAINER_INSERT(netsnmp_container *x, const void *k) --{ -- int rc2, rc = 0; -- -- /** start at first container */ -- while(x->prev) -- x = x->prev; -- for(; x; x = x->next) { -- if ((NULL != x->insert_filter) && -- (x->insert_filter(x,k) == 1)) -- continue; -- rc2 = x->insert(x,k); -- if (rc2) { -+int CONTAINER_INSERT_HELPER(netsnmp_container* x, const void* k) -+{ -+ while(x && x->insert_filter && x->insert_filter(x,k) == 1) -+ x = x->next; -+ if(x) { -+ int rc = x->insert(x,k); -+ if(rc) - snmp_log(LOG_ERR,"error on subcontainer '%s' insert (%d)\n", -- x->container_name ? x->container_name : "", rc2); -- rc = rc2; -+ x->container_name ? x->container_name : "", rc); -+ else { -+ rc = CONTAINER_INSERT_HELPER(x->next, k); -+ if(rc) -+ x->remove(x,k); - } -+ return rc; - } -- return rc; -+ return 0; -+} -+ -+/*------------------------------------------------------------------ -+ * These functions should EXACTLY match the inline version in -+ * container.h. If you change one, change them both. -+ */ -+int CONTAINER_INSERT(netsnmp_container* x, const void* k) -+{ -+ /** start at first container */ -+ while(x->prev) -+ x = x->prev; -+ return CONTAINER_INSERT_HELPER(x, k); - } - - /*------------------------------------------------------------------ ---- branches/V5-4-patches/net-snmp/include/net-snmp/library/container.h 2008/02/13 23:11:48 16803 -+++ branches/V5-4-patches/net-snmp/include/net-snmp/library/container.h 2008/02/13 23:37:48 16804 -@@ -351,27 +351,38 @@ - * container.c. If you change one, change them both. - */ - NETSNMP_STATIC_INLINE /* gcc docs recommend static w/inline */ -- int CONTAINER_INSERT(netsnmp_container *x, const void *k) -+ int CONTAINER_INSERT_HELPER(netsnmp_container* x, const void* k) - { -- int rc2, rc = 0; -- -- /** start at first container */ -- while(x->prev) -- x = x->prev; -- for(; x; x = x->next) { -- if ((NULL != x->insert_filter) && -- (x->insert_filter(x,k) == 1)) -- continue; -- rc2 = x->insert(x,k); -- if (rc2) { -+ while(x && x->insert_filter && x->insert_filter(x,k) == 1) -+ x = x->next; -+ if(x) { -+ int rc = x->insert(x,k); -+ if(rc) - snmp_log(LOG_ERR,"error on subcontainer '%s' insert (%d)\n", -- x->container_name ? x->container_name : "", rc2); -- rc = rc2; -+ x->container_name ? x->container_name : "", rc); -+ else { -+ rc = CONTAINER_INSERT_HELPER(x->next, k); -+ if(rc) -+ x->remove(x,k); - } -+ return rc; - } -- return rc; -+ return 0; - } -- -+ -+ /*------------------------------------------------------------------ -+ * These functions should EXACTLY match the function version in -+ * container.c. If you change one, change them both. -+ */ -+ NETSNMP_STATIC_INLINE /* gcc docs recommend static w/inline */ -+ int CONTAINER_INSERT(netsnmp_container* x, const void* k) -+ { -+ /** start at first container */ -+ while(x->prev) -+ x = x->prev; -+ return CONTAINER_INSERT_HELPER(x, k); -+ } -+ - /*------------------------------------------------------------------ - * These functions should EXACTLY match the function version in - * container.c. If you change one, change them both. -- 2.44.0