2003-06-19 Paul Jakma <paul@dishone.st>

	* Fix lib/smux.c's reliance on daemons exporting struct
          thread_master *master.
diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c
index 598fc3c..6e9beab 100644
--- a/bgpd/bgp_snmp.c
+++ b/bgpd/bgp_snmp.c
@@ -242,6 +242,7 @@
   {BGP4PATHATTRUNKNOWN,       OCTET_STRING, RONLY, bgp4PathAttrTable,
    3, {6, 1, 14}},
 };
+
 
 static u_char *
 bgpVersion (struct variable *v, oid name[], size_t *length, int exact,
@@ -874,7 +875,12 @@
 void
 bgp_snmp_init ()
 {
-  smux_init (bgpd_oid, sizeof bgpd_oid / sizeof (oid));
+  struct bgp_master *bm;
+  
+  if ( !(bm = bgp_get_master ()) )
+    return;
+    
+  smux_init (bm->master, bgpd_oid, sizeof bgpd_oid / sizeof (oid));
   REGISTER_MIB("mibII/bgp", bgp_variables, variable, bgp_oid);
   smux_start ();
 }