Community Discussions and Support
Using daemon.h function ji_get_data()

Well, try nil, and if that doesn't work either in your programming environment check if there is an alignment problem in the daemon (I believe Mercury expects byte aligned data).

/Rolf
 

<p>Well, try <b><i>nil,</i></b> and if that doesn't work either in your programming environment check if there is an alignment problem in the daemon (I believe Mercury expects byte aligned data).</p><p>/Rolf  </p>

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> 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> I've tried the following already:</P> <P> if !(ji_get_data(job, buffer, 1024))</P> <P>{</P> <P>then jump out</P> <P>}</P> <P mce_keep="true"> </P> <P mce_keep="true"> </P> <P>if (ji_get_data(job, buffer, 1024) == NULL)</P> <P>{</P> <P>then jump out</P> <P>}</P> <P mce_keep="true"> </P> <P>if (ji_get_data(job, buffer, 1024)==0)</P> <P>{</P> <P>then jump out</P> <P>}</P> <P mce_keep="true"> </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"> </P> <P>Many thanks,</P> <P>Alastair</P>
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft