'From etoys3.0 of 19 February 2008 [latest update: #2024] on 20 June 2008 at 12:39 am'! "Change Set: dbusStartup-bf Date: 20 June 2008 Author: Bert Freudenberg Fix DBus startup"! !DBusConnection methodsFor: 'initialize-release' stamp: 'bf 6/20/2008 00:18'! registerSemaphore (semaIndex notNil and: [(Smalltalk externalObjects at: semaIndex) == readSemaphore]) ifTrue: [^self]. semaIndex := readSemaphore ifNotNil: [Smalltalk registerExternalObject: readSemaphore]! ! !DBusConnection class methodsFor: 'private' stamp: 'bf 6/20/2008 00:22'! getBus: connIndex from: oldBus "automatically migrate to a more specific subclass of me" | sema | (oldBus isKindOf: self) ifTrue: [^oldBus]. oldBus ifNotNil: [ sema := oldBus readSemaphore. oldBus destroy]. sema ifNil: [sema := Semaphore new]. ^self new setConnectionIndex: connIndex readSemaphore: sema; startUp; yourself! !