MCPcopy Create free account
hub / github.com/SIPp/sipp / xp_set_xml_buffer_from_string

Function xp_set_xml_buffer_from_string

src/xp_parser.c:295–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295int xp_set_xml_buffer_from_string(const char *str)
296{
297 size_t len = strlen(str);
298
299 if (len > XP_MAX_FILE_LEN) {
300 return 0;
301 }
302
303 strcpy(xp_file, str);
304 xp_stack = xp_stack_invalid_line = 0;
305 xp_history_reset();
306 xp_position[xp_stack] = xp_file;
307
308 if (!strstartswith(xp_position[xp_stack], "<?xml"))
309 return 0;
310 if (!strstr(xp_position[xp_stack], "?>"))
311 return 0;
312 xp_position[xp_stack] = xp_position[xp_stack] + 2;
313
314 return 1;
315}
316
317int xp_set_xml_buffer_from_file(const char *filename)
318{

Callers 2

TESTFunction · 0.85
scenarioMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected