Thanks Dave, You made my day :-) static will do just fine.
Regards, Nuno Magalhães. On 06-01-2013 18:47, Dave Shield wrote: > On 5 January 2013 18:10, Nuno Magalhães <nuno.magalh...@inov.pt> wrote: >> Here it goes. > Thanks for that. > >> In windows embedded code full compilation it doesn't happen. >> In linux debian dlmod (obu.so) I must declared it inline to proc_status not >> return always zero. > I'm not currently set up for compiling dynamically loaded modules, > but I've had a go with compiling this code within the main Net-SNMP > agent, and that works as expect (reporting values of '5' and '7' > respectively). > > My suspicion is that there's an issue here that's specific to dynamically > loaded modules - and something about the requirements for such modules > that isn't quite right in your code. > This isn't really my area of expertise, but looking at the documentation > (http://net-snmp.sourceforge.net/wiki/index.php/TUT:Writing_a_Dynamically_Loadable_Object) > I note the following comment: > > These [init_xxx and deinit_xxx] are the only two functions called by > the object loaded. All other functions (and module-global variables) > therefore should be declared static. > > As I say, I'm not currently able to check this for you, but it might be worth > trying with 'proc_status' being declared as static, rather than inline. > > Dave > ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users