service: Add timeout event only the first time
authorYu A Wang <yu.a.wang@intel.com>
Thu, 9 Jun 2011 09:06:15 +0000 (05:06 -0400)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 14 Jun 2011 09:26:27 +0000 (11:26 +0200)
commit21d9a77c6568f22839ae745e21847d69837b9be6
tree17fcbf967ebd4551a59ea5c5062e7f143152d5f3
parenteb16a6becb8ab1dd4be3696ab446ab91830f6fc5
service: Add timeout event only the first time

When connect to a 3G service with weak signal, it may connect
several times. When connman suspend to S3 and resume several
times, function remove_timeout only remove the last timeout event.
This will lead connman crash when connect_timeout invoked by other
timeout event to access previous already freed service.
src/service.c