Re: Proton revision 1627945 barfs on cmake -DCMAKE_BUILD_TYPE=Debug ..

2014-09-29 Thread Michael Goulish
Sorry about that!
...fixed now, by making it static.
in future, i will test the default build and the debug build.


- Original Message -


On 09/29/2014 12:01 PM, Andrew Stitcher wrote:
> On Sat, 2014-09-27 at 16:18 +0100, Fraser Adams wrote:
>> I just updated to r1627945 and when I do
>> cmake -DCMAKE_BUILD_TYPE=Debug ..
>> make
>>
>> I get:
>>
>> Linking C shared library libqpid-proton.so
>> CMakeFiles/qpid-proton.dir/src/codec/codec.c.o: In function 
>> `pni_node_fields':
>> /home/fadams/qpid/qpid-trunk/proton/proton-c/src/codec/codec.c:99: 
>> undefined reference to `pn_data_node'
> ...
> 
> Without investigating fully, this looks like it is related to
> pn_data_node() being inline. I'd guess that in a debug build nothing is
> inlined, but because the function is marked inline no actual routine is
> generated for it.
> 
> I think pn_data_node() was marked inline recently - perhaps it is not
> also marked 'static' which I think might give this error.

I can confirm that marking pn_data_node static does fix the build in
Debug mode.

> 
> Andrew
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Proton 0.8 RC1

2014-09-29 Thread Rafael Schloming
Hi Everyone,

I've created 0.8 RC1 and posted it in the usual locations. The source can
be found here:

  http://people.apache.org/~rhs/qpid-proton-0.8rc1/

Java binaries are available here:

  https://repository.apache.org/content/repositories/orgapacheqpid-1015/

Please check it out and follow up with email and/or JIRAs as appropriate.

Thanks,

---Rafael


RE: Duplicate Messages

2014-09-29 Thread Steve Huston
Hi Raphael,

> I am new to Qpid, starting to work on an extensive projects code base.

Welcome!

> I am trying to find the spot in the documentation where guarantees of the
> messaging system are discussed. For example: in case of a network problem,
> could it happen that the broker sends the same message twice?

Yes:
http://qpid.apache.org/releases/qpid-0.30/programming/book/acknowledgements.html

> There is some duplicate checking and I would like to confirm it is necessary.

Yes, it is.

-Steve Huston

-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Duplicate Messages

2014-09-29 Thread Raphael Fuchs
Hello,

I am new to Qpid, starting to work on an extensive projects code base.

I am trying to find the spot in the documentation where guarantees of the
messaging system are discussed. For example: in case of a network problem,
could it happen that the broker sends the same message twice?

There is some duplicate checking and I would like to confirm it is
necessary.

Thanks for your help!
Raphael


Re: pn_subscription_address is empty more than is useful......

2014-09-29 Thread Rafael Schloming
On Fri, Sep 26, 2014 at 12:51 PM, Fraser Adams <
fraser.ad...@blueyonder.co.uk> wrote:

> pn_subscription_address returns the source address of a subscription as a
> string when a subscription is successfully made.
>
> Well rather, it should.
>
> If I were to subscribe to a node on a broker it seems to work fine, that
> is to say if I have an address of say:
>
> localhost/test
>
> where test is a queue called test, then it works fine. Even if I do
>
> localhost/#
>
> A call to pn_subscription_address will contain the whole address including
> the dynamic node name once the broker has created the queue.
>
> In my case I'm using non-blocking code and pn_subscription_address will
> get called several times in my notifier, initially returning NULL but
> eventually returning the information I want.
>
> So far so good, but if I have an address of say:
>
> amqp://~0.0.0.0
>
> or even say
>
> amqp://~0.0.0.0/test
>
> I never get a non-NULL address.
>
>
> It's actually quite useful to be able to identify that Messenger has
> successfully created a subscription, especially for asynchronous code. I've
> used it in code connecting to a broker to actually start doing something
> useful on a dynamic queue but for peer-peer code I can't do the same.
>
> Perhaps with amqp://~0.0.0.0 I can assume that they have been immediately
> created? Is that a safe assumption?
>

Technically the bind can fail if there is another process bound to the
port, so strictly speaking that isn't a valid assumption.

--Rafael


Re: Proton revision 1627945 barfs on cmake -DCMAKE_BUILD_TYPE=Debug ..

2014-09-29 Thread Andrew Stitcher
On Mon, 2014-09-29 at 15:05 -0400, Andrew Stitcher wrote:
> ...
> To clarify:
> 
> When using C99 You must always make inline functions "static inline"
> anything else is a bug.
> 
> If you compile your code using gcc or C++ then inline by itself will
> work (mostly).

And to amplify (sorry to write multiple messages) - "inline" by itself
is not even a keyword for standard C before C99, the fact that it is
accepted by gcc is an extension - it is not accepted by MSVC before 2013
(which has most of the useful bits of C99 in it).

This is one of the reasons we compile proton as C++ on MSVC.

Andrew



-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: Proton revision 1627945 barfs on cmake -DCMAKE_BUILD_TYPE=Debug ..

2014-09-29 Thread Andrew Stitcher
On Mon, 2014-09-29 at 14:00 -0400, Ted Ross wrote:
> 
> On 09/29/2014 12:01 PM, Andrew Stitcher wrote:
> > On Sat, 2014-09-27 at 16:18 +0100, Fraser Adams wrote:
> >> I just updated to r1627945 and when I do
> >> cmake -DCMAKE_BUILD_TYPE=Debug ..
> >> make
> >>
> >> I get:
> >>
> >> Linking C shared library libqpid-proton.so
> >> CMakeFiles/qpid-proton.dir/src/codec/codec.c.o: In function 
> >> `pni_node_fields':
> >> /home/fadams/qpid/qpid-trunk/proton/proton-c/src/codec/codec.c:99: 
> >> undefined reference to `pn_data_node'
> > ...
> > 
> > Without investigating fully, this looks like it is related to
> > pn_data_node() being inline. I'd guess that in a debug build nothing is
> > inlined, but because the function is marked inline no actual routine is
> > generated for it.
> > 
> > I think pn_data_node() was marked inline recently - perhaps it is not
> > also marked 'static' which I think might give this error.
> 
> I can confirm that marking pn_data_node static does fix the build in
> Debug mode.

To clarify:

When using C99 You must always make inline functions "static inline"
anything else is a bug.

If you compile your code using gcc or C++ then inline by itself will
work (mostly).

Andrew



-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: Proton revision 1627945 barfs on cmake -DCMAKE_BUILD_TYPE=Debug ..

2014-09-29 Thread Ted Ross


On 09/29/2014 12:01 PM, Andrew Stitcher wrote:
> On Sat, 2014-09-27 at 16:18 +0100, Fraser Adams wrote:
>> I just updated to r1627945 and when I do
>> cmake -DCMAKE_BUILD_TYPE=Debug ..
>> make
>>
>> I get:
>>
>> Linking C shared library libqpid-proton.so
>> CMakeFiles/qpid-proton.dir/src/codec/codec.c.o: In function 
>> `pni_node_fields':
>> /home/fadams/qpid/qpid-trunk/proton/proton-c/src/codec/codec.c:99: 
>> undefined reference to `pn_data_node'
> ...
> 
> Without investigating fully, this looks like it is related to
> pn_data_node() being inline. I'd guess that in a debug build nothing is
> inlined, but because the function is marked inline no actual routine is
> generated for it.
> 
> I think pn_data_node() was marked inline recently - perhaps it is not
> also marked 'static' which I think might give this error.

I can confirm that marking pn_data_node static does fix the build in
Debug mode.

> 
> Andrew
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: Proton revision 1627945 barfs on cmake -DCMAKE_BUILD_TYPE=Debug ..

2014-09-29 Thread Andrew Stitcher
On Sat, 2014-09-27 at 16:18 +0100, Fraser Adams wrote:
> I just updated to r1627945 and when I do
> cmake -DCMAKE_BUILD_TYPE=Debug ..
> make
> 
> I get:
> 
> Linking C shared library libqpid-proton.so
> CMakeFiles/qpid-proton.dir/src/codec/codec.c.o: In function 
> `pni_node_fields':
> /home/fadams/qpid/qpid-trunk/proton/proton-c/src/codec/codec.c:99: 
> undefined reference to `pn_data_node'
...

Without investigating fully, this looks like it is related to
pn_data_node() being inline. I'd guess that in a debug build nothing is
inlined, but because the function is marked inline no actual routine is
generated for it.

I think pn_data_node() was marked inline recently - perhaps it is not
also marked 'static' which I think might give this error.

Andrew



-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org