Re: sprint_realloc_hexstring with no line breaks

2014-04-28 Thread Eugenio Pérez
Hi Niels! Thanks for the answer!

I wanted to avoid innecesaries copies of buffer or calls to malloc system.
I've noticed that, if I set NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH to 0 at the
beginning of the program, it works the way I want.

By the way, I am writing a plugin to send trap output to Apache Kafka.
Where I should send the pull request? Do I need to have a sourceforge
account or I could send it to a mail?

Regards and thanks for all


2014-04-26 22:06 GMT+02:00 Niels Baggesen n...@users.sourceforge.net:

 Den 25-04-2014 10:15, Eugenio Pérez skrev:

  At the moment, I'm using:
 netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH,
 2048);
 At the first of my program. However, this forces me to alloc a huge
 memory foreach line,


 Yes and no. Nothing keeps you from realloc'ing it down to its actual size
 after the formatting.


  Is there another function or something I can use to achieve that?


 Currently no. We could create yet another option to keep it from adding
 the newline, or you could squeeze them out after call to format_trap /
 format_hexstring

 /Niels

 --
 Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
 The purpose of computing is insight, not numbers   ---   R W Hamming

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: sprint_realloc_hexstring with no line breaks

2014-04-28 Thread Niels Baggesen
Den 28-04-2014 18:29, Eugenio Pérez skrev:
 I wanted to avoid innecesaries copies of buffer or calls to malloc
 system. I've noticed that, if I set NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH to
 0 at the beginning of the program, it works the way I want.

Of course! I should have thought about 0 meaning unlimited.

 By the way, I am writing a plugin to send trap output to Apache Kafka.
 Where I should send the pull request? Do I need to have a sourceforge
 account or I could send it to a mail?

I think that there is some fork/pull functionality built into 
sourceforge, but it seems that sourceforge is having problems at the 
moment :-(

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders