Commit b812d324 authored by Éric Thiébaut's avatar Éric Thiébaut
Browse files

Fix serial number returned on error

parent 61a274a9
......@@ -156,7 +156,7 @@ tao_serial tao_remote_camera_configure(
// Check arguments.
if (cam == NULL || cfg == NULL) {
tao_store_error(__func__, TAO_BAD_ADDRESS);
return TAO_ERROR;
return -1;
}
// Attempt to lock the remote camera and wait for it becomes ready for a
......@@ -183,7 +183,7 @@ static tao_serial send_simple_command(
// Check arguments.
if (cam == NULL) {
tao_store_error(func, TAO_BAD_ADDRESS);
return TAO_ERROR;
return -1;
}
// Attempt to lock the remote camera and wait for it becomes ready for a
......
......@@ -243,7 +243,7 @@ static tao_serial send_simple_command(
// Check arguments.
if (obj == NULL) {
tao_store_error(func, TAO_BAD_ADDRESS);
return TAO_ERROR;
return -1;
}
if (cmd == TAO_COMMAND_NONE) {
tao_store_error(__func__, TAO_BAD_COMMAND);
......@@ -283,11 +283,11 @@ tao_serial tao_remote_mirror_set_reference(
// Check arguments.
if (obj == NULL || vals == NULL) {
tao_store_error(__func__, TAO_BAD_ADDRESS);
return TAO_ERROR;
return -1;
}
if (nvals != obj->nacts) {
tao_store_error(__func__, TAO_BAD_SIZE);
return TAO_ERROR;
return -1;
}
// Prepare for i/o.
......@@ -327,11 +327,11 @@ tao_serial tao_remote_mirror_send_commands(
// Check arguments.
if (obj == NULL || vals == NULL) {
tao_store_error(__func__, TAO_BAD_ADDRESS);
return TAO_ERROR;
return -1;
}
if (nvals != obj->nacts) {
tao_store_error(__func__, TAO_BAD_SIZE);
return TAO_ERROR;
return -1;
}
// Prepare for i/o.
......
......@@ -26,7 +26,7 @@ TAO_BEGIN_DECLS
*
* A remote mirror instance is a structure stored in shared memory which is
* used to communicate with a deformable mirror server. The shared structure
* contains the current settings of a deformable mirror and an history of the
* contains the current settings of the deformable mirror and an history of the
* commands sent to the device.
*
* @{
......
Supports Markdown
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