[Openais] coroipcc_dispatch_get return values

Angus Salkeld asalkeld at redhat.com
Tue Mar 22 14:21:59 PDT 2011


On Mon, Mar 21, 2011 at 06:46:03PM +0530, Ramesh Random wrote:
> Hi,
>        i am using coroipcc_dispatch_get() to read the asynchronous buffer
> response. i am not able to differentiate between return values for it
> CS_ERR_TRY_AGAIN and CS_OK. i tried to look into source code of
> coroipcc_dispatch_get() couldnt make out anything in short time. basically
> if this function returns CS_ERR_TRY_AGAIN..does it mean buffer is empty &
> doesnt have any data? or is there any genuine error like other got
> disconnected?

In this case you should get CS_ERR_LIBRARY.

> 
>  i just want to differentiate between two cases...
> 
> a) buffer is empty....and client & server didnt encounter any error ..what
> return value i expect is it CS_OK?
CS_ERR_TRY_AGAIN if no data
CS_OK if there was data

> 
> b) there is a case like server side disconnected?
CS_ERR_LIBRARY

> 
> is there any doc which explains return values for API's

No, the header include/corosync/coroipcc.h should have some doxygen
comments in it.


If you are wiring a new client/server you should consider libqb
(git://libqb.org/libqb.git), corosync-2.0 will use it for IPC
I have made more effort documenting the API:
http://libqb.org/html/doxygen-0.4.1/

-Angus

> 
> thanks for help in advance
> 
> Ramesh

> _______________________________________________
> Openais mailing list
> Openais at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/openais



More information about the Openais mailing list