Commit 83237bd3 authored by Matteo Quintiliani's avatar Matteo Quintiliani

Minor change


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@968 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 0ebb87bc
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy * Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it * quintiliani@ingv.it
* *
* $Id: nmxp_base.c,v 1.65 2008-03-26 09:22:54 mtheo Exp $ * $Id: nmxp_base.c,v 1.66 2008-03-26 15:48:38 mtheo Exp $
* *
*/ */
...@@ -228,6 +228,9 @@ int nmxp_recv_ctrl(int isock, void *buffer, int length, int timeoutsec, int *rec ...@@ -228,6 +228,9 @@ int nmxp_recv_ctrl(int isock, void *buffer, int length, int timeoutsec, int *rec
recvCount = 0; recvCount = 0;
while(cc > 0 && *recv_errno == 0 && recvCount < length) { while(cc > 0 && *recv_errno == 0 && recvCount < length) {
/* TODO some operating system could not reset errno */
/* errno = 0 */
#ifdef HAVE_BROKEN_SO_RCVTIMEO #ifdef HAVE_BROKEN_SO_RCVTIMEO
if(timeoutsec == 0) { if(timeoutsec == 0) {
#endif #endif
......
...@@ -158,7 +158,10 @@ int nmxptool_ew_pd2ewring (NMXP_DATA_PROCESS *pd, SHM_INFO *pregionOut, MSG_LOGO ...@@ -158,7 +158,10 @@ int nmxptool_ew_pd2ewring (NMXP_DATA_PROCESS *pd, SHM_INFO *pregionOut, MSG_LOGO
/* TODO : all of the samples /* TODO : all of the samples
should always fit into a single TracePacket if MAX_TRACEBUF_SIZ should always fit into a single TracePacket if MAX_TRACEBUF_SIZ
remains defined in Trace_buf.h as 4096 or greater */ remains defined in Trace_buf.h as 4096 or greater
17 * 59 = 1003 samples = 4012 bytes
4012 + 64 = 4076 < 4096
*/
samples = (int32_t *) ((char *)&tbuf + sizeof(TRACE_HEADER)); samples = (int32_t *) ((char *)&tbuf + sizeof(TRACE_HEADER));
for(i=0; i < pd->nSamp; i++) { for(i=0; i < pd->nSamp; i++) {
......
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 to comment