Mercurial > hg > audiodb
comparison soap.cpp @ 508:23c47e118bc6
Better soap memory correctness.
Pass the struct soap down through audioDB::query into Reporter::report
methods.
We go through the audioDB constructor and do everything on the stack.
We'll eventually also need to add a pointer member within the audioDB
object, so that non-local transfers of control (particularly
audioDB::error) can still allocate soap-specific memory.
Then use soap_malloc() not new[] for memory allocation of
adbQueryResponse data structures.
author | mas01cr |
---|---|
date | Tue, 13 Jan 2009 21:37:14 +0000 |
parents | 342822c2d49a |
children | cc2b97d020b1 |
comparison
equal
deleted
inserted
replaced
507:e7fd50483311 | 508:23c47e118bc6 |
---|---|
292 } | 292 } |
293 | 293 |
294 argv[argv_counter] = NULL; | 294 argv[argv_counter] = NULL; |
295 | 295 |
296 try { | 296 try { |
297 audioDB(argc, argv, &adbQueryResponse); | 297 audioDB(argc, argv, soap, &adbQueryResponse); |
298 delete [] argv; | 298 delete [] argv; |
299 return SOAP_OK; | 299 return SOAP_OK; |
300 } catch (char *err) { | 300 } catch (char *err) { |
301 soap_receiver_fault(soap, err, ""); | 301 soap_receiver_fault(soap, err, ""); |
302 delete [] argv; | 302 delete [] argv; |
359 | 359 |
360 const unsigned argc = 23; | 360 const unsigned argc = 23; |
361 | 361 |
362 | 362 |
363 try { | 363 try { |
364 audioDB(argc, argv, &adbQueryResponse); | 364 audioDB(argc, argv, soap, &adbQueryResponse); |
365 return SOAP_OK; | 365 return SOAP_OK; |
366 } catch (char *err) { | 366 } catch (char *err) { |
367 soap_receiver_fault(soap, err, ""); | 367 soap_receiver_fault(soap, err, ""); |
368 return SOAP_FAULT; | 368 return SOAP_FAULT; |
369 } | 369 } |