cannot read data send by server
Helge Blischke
h.blischke at acm.org
Fri Feb 4 03:56:40 PST 2011
Patrice wrote:
> Hello
>
> i am trying to read the data send by the printer to the server through the
> network by using httpRead and ippRead functions. my code is as follow:
>
> void read_file()
> {
> http_t *http = httpConnect("254.123.27.2", 631); //connect to server
> ipp_t *ipp = ippNew();
> ipp_state_t status;
>
> while ((status = ippRead(http, ipp)) != IPP_ERROR)
> if (status == IPP_DATA)
> break;
> if (status == IPP_DATA)
> {
> cout <<"Data to be read"<<endl;
> //data will be read here using httpRead
> }
> }
>
> my problem is that the i do not get to the second if statement. what could
> possibly be the problem. I am using cups with Qt4 library so there is a
> Qt4 signal that checks if there is a data pending on the server and the
> data will be read using httpRead/ippRead
Both if statements check the very same condition, thus you won't get to the
second if statement.
Helge
More information about the cups-devel
mailing list