Discussion:
Bug fix: traderd crashed when linked with other traders
Thomas Schmidt
2011-12-23 11:05:27 UTC
Permalink
Hi,

traderd crashed when answering a query which was forwarded to another trader due to an uninitialized `OfferŽ attribute. My bug fix as "diff -u":

Index: trader_main.cc
===================================================================
RCS file: /usr/src/cvs/Communication/CORBA/mico/coss/trader/trader_main.cc,v
retrieving revision 1.1
diff -u -r1.1 trader_main.cc
--- trader_main.cc 20 Feb 2008 15:22:27 -0000 1.1
+++ trader_main.cc 23 Dec 2011 10:58:25 -0000
@@ -701,6 +701,7 @@
// We fake an offer id here. It is not used here so it does not matter
o.vOfferId = CORBA::string_dup( "" );
// We move the offer in this list so it becomes delete once the function returns or exits
+ o.isProxy = false;
linked_offers.push_back( o );
match.push_back( &(linked_offers.back()) );
}


--
Thomas Schmidt
Velgen 1
D-29582 Hanstedt
Tel: +49-4134-236339
Mobil: +49-151-23095598
Skype: ThCSchmidt
Email: ***@gmx.net
PGP: Key-ID: 0x810B6206

Loading...