On 5 January 2013 18:10, Nuno Magalhães <[email protected]> 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. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to