Ticket #162 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

Patch: Don't clear out the full buffer when constructing a log message

Reported by: markdoliner Owned by: smoku
Priority: major Component: General
Version: 2.1.17 Keywords:
Cc: Tracforge_linkmap:
Blocking: Blocked By:

Description

The log_write() function gets called a lot. It takes some input parameters and puts them into a buffer, then prints the buffer. Before it puts the parameters into the buffer it memset's the entire thing to 0. It's probably more efficient to NOT memset it and instead just null terminate the message after the call to vsnprintf() or snprintf().

Attachments

jabberd2_dont_reset_whole_buffer.diff (1.2 kB) - added by markdoliner 10 months ago.

Change History

Changed 10 months ago by markdoliner

Changed 10 months ago by smoku

  • status changed from new to closed
  • resolution set to fixed

(In [431]) Don't clear out the full buffer when constructing a log message. Fixes #162

Note: See TracTickets for help on using tickets.