Review Board 1.7.16


Convert pbx_spool to use string fields

Review Request #168 - Created Feb. 19, 2009 and submitted

Mark Michelson
/trunk
Reviewers
asterisk-dev
Asterisk
Simple. Convert all the static buffers used in pbx_spool to be string fields. This will dramatically lower the amount of memory used when processing a call file.
It compiles.

Changes between revision 2 and 3

1 2 3
1 2 3

  1. /trunk/pbx/pbx_spool.c: Loading...
/trunk/pbx/pbx_spool.c
Diff Revision 2 Diff Revision 3
[20] 89 lines
[+20] [+] static int init_outgoing(struct outgoing *o)
90
	o->priority = 1;
90
	o->priority = 1;
91
	o->retrytime = 300;
91
	o->retrytime = 300;
92
	o->waittime = 45;
92
	o->waittime = 45;
93
	o->format = AST_FORMAT_SLINEAR;
93
	o->format = AST_FORMAT_SLINEAR;
94
	ast_set_flag(&o->options, SPOOL_FLAG_ALWAYS_DELETE);
94
	ast_set_flag(&o->options, SPOOL_FLAG_ALWAYS_DELETE);
95
	if (!(ast_string_field_init(o, 128))) {
95
	if (ast_string_field_init(o, 128)) {
96
		return -1;
96
		return -1;
97
	}
97
	}
98
	return 0;
98
	return 0;
99
}
99
}
100

    
   
100

   
[+20] [20] 432 lines
  1. /trunk/pbx/pbx_spool.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.