diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-19 17:59:25 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-19 17:59:25 +0200 |
commit | b646194911cd70e91e84c8354d5bac35b27156df (patch) | |
tree | 81a9b56faa50eaf04981ae9f756a5b84e4f4ba24 /cli.c | |
parent | 9e424252a35879f121e7ea4531a9ab3dda56d595 (diff) | |
download | ipecamera-b646194911cd70e91e84c8354d5bac35b27156df.tar.gz ipecamera-b646194911cd70e91e84c8354d5bac35b27156df.tar.bz2 ipecamera-b646194911cd70e91e84c8354d5bac35b27156df.tar.xz ipecamera-b646194911cd70e91e84c8354d5bac35b27156df.zip |
Few fixes for IPE Camera modification
Diffstat (limited to 'cli.c')
-rw-r--r-- | cli.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -782,7 +782,9 @@ int WriteData(pcilib_t *handle, ACCESS_MODE mode, pcilib_dma_engine_addr_t dma, if (dmaid == PCILIB_DMA_ENGINE_INVALID) Error("Invalid DMA engine (%lu) is specified", dma); err = pcilib_write_dma(handle, dmaid, addr, size, buf, &ret); if ((err)||(ret != size)) { - if (!ret) Error("No data is written by DMA engine"); + if (err == PCILIB_ERROR_TIMEOUT) Error("Timeout writting the data to DMA"); + else if (err) Error("DMA engine returned a error while writing the data"); + else if (!ret) Error("No data is written by DMA engine"); else Error("Only %lu bytes of %lu is written by DMA engine", ret, size); } break; |