[openamq-dev] session->alive always 0
Jörg Fischer
joerg.fischer at biologie.uni-freiburg.de
Fri Oct 26 17:21:21 CEST 2007
Using BASE_THREADSAFE seems to work! I hope this problem is finished now.
Thanks Dmitri an Pieter for your advice.
Have a nice weekend,
Jörg
Dmitri Tsyganov schrieb:
> I think you may be dealing with the the build inconsistency - if you
> built Open AMQ as multi-threaded library, you need to build your code
> with BASE_THREADSAFE defined - that adds additional member (mutex, I
> think) to each structure. Mutex member is deffed-out if you build
> single-threaded version - BASE_THREADSAFE is undefined.
>
> Hope this helps,
>
> Dmitri
>
> On Fri, 2007-10-26 at 13:07 +0200, Jörg Fischer wrote:
>
>> Hi Pieter,
>>
>> according to your advice I've taken a closer look into the memory around
>> the connection
>> struct. I found out that if 4 bytes are added to the struct-pointer,
>> everything looks fine: alive is 1 and the properties like
>> connection->server_product don't have these leading zeros.
>>
>> Then I tried to around with #pragma pack but since I'm quite new to C++,
>> the resulting effects didn't make sense to me nor solve the problem. Can
>> you give me another hint where to look? Could it be a problem with the
>> Visual Studio 2005 runtime libraries?
>>
>> Thanks,
>>
>> Jörg Fischer
>>
>>
>> Pieter Hintjens schrieb:
>>
>>> On 10/25/07, Jörg Fischer <joerg.fischer at biologie.uni-freiburg.de> wrote:
>>>
>>>
>>>
>>>> 1. It is unable to detect disconnections from the server, to be precise:
>>>> session->alive and connection->alive are always 0. Sending and receiving works.
>>>>
>>>>
>>>
>>>
>>>> 2. All connection properties I get have 4 leading bytes with value 0. Why?
>>>>
>>>>
>>> These are presumably related, and suggest that your connection
>>> reference is pointing into some random nullified space instead of the
>>> real connection object.
>>>
>>> -Pieter
>>> _______________________________________________
>>> openamq-dev mailing list
>>> openamq-dev at lists.openamq.org
>>> http://lists.openamq.org/mailman/listinfo/openamq-dev
>>>
>>>
>>
> _______________________________________________
> openamq-dev mailing list
> openamq-dev at lists.openamq.org
> http://lists.openamq.org/mailman/listinfo/openamq-dev
>
--
Dipl.-Inf. Joerg Fischer
e-mail: joerg.fischer at biologie.uni-freiburg.de
Tel: +49-761-203-2910
Institute for Biology I
Albert-Ludwigs University
Hauptstraße 1
79104 Freiburg
Germany
More information about the openamq-dev
mailing list