Commit 6562c0b7 by zacharyc

Fixed bug when output pipe is closed without a KILL signal


git-svn-id: https://bucket.mit.edu/svn/nilm/acquisition/ethstream@7301 ddd99763-3ecb-0310-9145-efcb8ce7c51f
parent 7f79ec8f
Showing with 10 additions and 5 deletions
......@@ -477,9 +477,14 @@ nerdDoStream (const char *address, int *channel_list, int channel_count,
goto out;
}
if (nerd_data_stream
retval = nerd_data_stream
(fd_data, channel_count, channel_list, precision, convert, lines,
showmem, &currentcount, period) < 0)
showmem, &currentcount, period);
if(retval == -3)
{
retval = 0;
}
if(retval < 0)
{
info ("Failed to open data stream\n");
goto out1;
......@@ -627,5 +632,5 @@ data_callback (int channels, uint16_t * data, void *context)
bad:
info ("Output error (disk full?)\n");
return -1;
return -3;
}
......@@ -200,7 +200,7 @@ nerd_send_command (const char *address, void *command, int length)
if (0 != strcmp ("OK", buf))
{
verb ("Did not receive OK. Received %s\n", buf);
return -3;
return -1;
}
return 0;
......@@ -480,7 +480,7 @@ nerd_data_stream (int data_fd, int numChannels, int *channel_list,
bad:
info ("Output error (disk full?)\n");
return -1;
return -3;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment