Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
Diff: SnSDUtils.cpp
- Revision:
- 16:744ce85aede2
- Parent:
- 15:f2569d8e4176
- Child:
- 19:74155d652c37
--- a/SnSDUtils.cpp Fri Aug 31 02:09:09 2012 +0000 +++ b/SnSDUtils.cpp Wed Sep 12 04:47:22 2012 +0000 @@ -191,11 +191,11 @@ SnEventFrame& evt, SnPowerFrame& pow, const uint32_t handshakeTimeout) { - + DIR* d; struct dirent* dent; - SnCommWin::ECommWinResult rs = SnCommWin::kUndefFail; + SnCommWin::ECommWinResult rs = SnCommWin::kOkMsgSent; const bool doDelete = curConf.IsDeletingFiles(); @@ -215,9 +215,16 @@ printf("calling senddata: f=%p (cur %p), fn=%s\r\n", f, GetCurFile(), dent->d_name); #endif - rs = comm->SendData(f, dent->d_name, - curConf, evt, pow, buf, bsize, - 0, timeout, handshakeTimeout); + const SnCommWin::ECommWinResult res = + comm->SendData(f, dent->d_name, + curConf, evt, pow, buf, bsize, + 0, timeout, handshakeTimeout); + if (res<rs) { + rs = res; + } + // don't stop if res is bad. don't want one bad file to + // prevent sending the others + // send data should close or delete the file (if appropriate) // unless it's the current file if (isCurFile) {