I am successfully using the ji_get_data() function a number of times in my Daemon code.
According to the daemon readme file the return value of ji_get_data() is either buffer on success or NULL.
I do a check to see if the end of a message has been reached assuming that if there is no more text content in the message then ji_get_data would return NULL.
I've tried the following already:
if !(ji_get_data(job, buffer, 1024))
{
then jump out
}
if (ji_get_data(job, buffer, 1024) == NULL)
{
then jump out
}
if (ji_get_data(job, buffer, 1024)==0)
{
then jump out
}
if (ji_get_data(job, buffer, 1024) == -1)
{
then jump out
}
None of the above work.
Please could you advise me on what return value I should be checking for if the buffer is actually empty and the end of message has been reached?
Many thanks,
Alastair
<P>I am successfully using the ji_get_data() function a number of times in my Daemon code.</P>
<P>&nbsp;According to the daemon readme file the return value of ji_get_data() is either buffer on success or NULL.</P>
<P>I do a check to see if the end of a message has been reached assuming that if there is no more text content in the message then ji_get_data would return NULL.</P>
<P>&nbsp;I've tried the following already:</P>
<P>&nbsp;if !(ji_get_data(job, buffer, 1024))</P>
<P>{</P>
<P>then jump out</P>
<P>}</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P>if (ji_get_data(job, buffer, 1024) == NULL)</P>
<P>{</P>
<P>then jump out</P>
<P>}</P>
<P mce_keep="true">&nbsp;</P>
<P>if (ji_get_data(job, buffer, 1024)==0)</P>
<P>{</P>
<P>then jump out</P>
<P>}</P>
<P mce_keep="true">&nbsp;</P>
<P>if (ji_get_data(job, buffer, 1024) == -1)</P>
<P>{</P>
<P>then jump out</P>
<P>}</P>
<P>None of the above work. </P>
<P>Please could you advise me on what return value I should be checking for if the buffer is actually empty and the end of message has been reached?</P>
<P mce_keep="true">&nbsp;</P>
<P>Many thanks,</P>
<P>Alastair</P>