| 1343 | } |
| 1344 | |
| 1345 | cs_error_t cpg_iteration_next( |
| 1346 | cpg_iteration_handle_t handle, |
| 1347 | struct cpg_iteration_description_t *description) |
| 1348 | { |
| 1349 | cs_error_t error; |
| 1350 | struct cpg_iteration_instance_t *cpg_iteration_instance; |
| 1351 | struct req_lib_cpg_iterationnext req_lib_cpg_iterationnext; |
| 1352 | struct res_lib_cpg_iterationnext res_lib_cpg_iterationnext; |
| 1353 | |
| 1354 | if (description == NULL) { |
| 1355 | return CS_ERR_INVALID_PARAM; |
| 1356 | } |
| 1357 | |
| 1358 | error = hdb_error_to_cs (hdb_handle_get (&cpg_iteration_handle_t_db, handle, |
| 1359 | (void *)&cpg_iteration_instance)); |
| 1360 | if (error != CS_OK) { |
| 1361 | goto error_exit; |
| 1362 | } |
| 1363 | |
| 1364 | req_lib_cpg_iterationnext.header.size = sizeof (struct req_lib_cpg_iterationnext); |
| 1365 | req_lib_cpg_iterationnext.header.id = MESSAGE_REQ_CPG_ITERATIONNEXT; |
| 1366 | req_lib_cpg_iterationnext.iteration_handle = cpg_iteration_instance->executive_iteration_handle; |
| 1367 | |
| 1368 | error = qb_to_cs_error (qb_ipcc_send (cpg_iteration_instance->conn, |
| 1369 | &req_lib_cpg_iterationnext, |
| 1370 | req_lib_cpg_iterationnext.header.size)); |
| 1371 | if (error != CS_OK) { |
| 1372 | goto error_put; |
| 1373 | } |
| 1374 | |
| 1375 | error = qb_to_cs_error (qb_ipcc_recv (cpg_iteration_instance->conn, |
| 1376 | &res_lib_cpg_iterationnext, |
| 1377 | sizeof(struct res_lib_cpg_iterationnext), -1)); |
| 1378 | if (error != CS_OK) { |
| 1379 | goto error_put; |
| 1380 | } |
| 1381 | |
| 1382 | marshall_from_mar_cpg_iteration_description_t( |
| 1383 | description, |
| 1384 | &res_lib_cpg_iterationnext.description); |
| 1385 | |
| 1386 | error = res_lib_cpg_iterationnext.header.error; |
| 1387 | |
| 1388 | error_put: |
| 1389 | hdb_handle_put (&cpg_iteration_handle_t_db, handle); |
| 1390 | |
| 1391 | error_exit: |
| 1392 | return (error); |
| 1393 | } |
| 1394 | |
| 1395 | cs_error_t cpg_iteration_finalize ( |
| 1396 | cpg_iteration_handle_t handle) |
no test coverage detected