[openamq-dev] Return value of amq_client_session_wait ()

mousami lokapur mousami31 at hotmail.com
Mon Aug 20 13:22:54 CEST 2007


Hi,
As per the explaination provided in wireapi.html
amq_client_session_wait ():
Waits for content to arrive from the server. You must call this method in 
order to get content. Returns zero if content arrived, or -1 if the timeout 
expired:

I am using this piece of code in my program:
:
:
int messagereturn = 0;
:
:
:
:
messagereturn = amq_client_session_wait (session, 60000);
if (amq_client_session_basic_arrived_count (session)) {
    icl_console_print ("I: have messages to process...");
    content = amq_client_session_basic_arrived (session);
    while (content) {
        //  process content
        content = amq_client_session_basic_arrived (session);
    }
}

here the function returns 0 but content is not received as the program fails 
at statement:
assert(content);

Please let me know the reason behind the same.

Thanks
Mousami

_________________________________________________________________
Tried the new MSN Messenger? It’s cool! Download now. 
http://messenger.msn.com/Download/Default.aspx?mkt=en-in



More information about the openamq-dev mailing list