| 287 | } |
| 288 | |
| 289 | int FileChannel::recvVector(int dbTag, int commitTag, |
| 290 | Vector &theVector, |
| 291 | ChannelAddress *theAddress) |
| 292 | { |
| 293 | int nleft, size; |
| 294 | size = theVector.Size(); |
| 295 | double *data = new double[size]; |
| 296 | void *gMsg = (void *)data; |
| 297 | nleft = theVector.Size() * sizeof(double); |
| 298 | |
| 299 | if ( fread( gMsg, nleft, 1, theFile) != 1 ) { |
| 300 | printf("Error in FileChannel::recvVector, did not read\n"); |
| 301 | delete [] data; |
| 302 | return -1; |
| 303 | } |
| 304 | else { |
| 305 | theVector.setData (data, size); |
| 306 | return 0; |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | int FileChannel::sendID(int dbTag, int commitTag, const ID &theID,ChannelAddress *theAddress) |
| 311 | { |