* shmid are passed to that function as an osl object. The private_result_data
* pointer is passed as the second argument to \a result_handler.
*
- * \return Standard.
+ * \return Number of shared memory areas dispatched on success, negative on errors.
*
* \sa send_option_arg_callback_request(), send_standard_callback_request().
*/
void *query_shm;
char buf[sizeof(afs_socket_cookie) + sizeof(int)];
size_t query_shm_size = sizeof(*cq);
- int dispatch_error = 0;
+ int dispatch_error = 0, num_dispatched = 0;
if (query)
query_shm_size += query->size;
if (ret < 0)
PARA_CRIT_LOG("destroy result failed: %s\n",
para_strerror(-ret));
+ num_dispatched++;
}
out:
if (shm_destroy(query_shmid) < 0)
if (fd >= 0)
close(fd);
// PARA_DEBUG_LOG("callback_ret: %d\n", ret);
- return ret;
+ return ret < 0? ret : num_dispatched;
}
/**