k5_ipc_stream io_stream)
{
kim_error err = KIM_NO_ERROR;
- kim_options options = NULL;
+ kim_options options = in_options;
if (!err && !io_stream ) { err = check_error (KIM_NULL_PARAMETER_ERR); }
if (!err && !in_options) {
- err = kim_options_create(&options);
- } else {
- err = kim_options_copy(&options, in_options);
+ err = kim_options_create (&options);
}
if (!err) {
- err = k5_ipc_stream_write_int64 (io_stream, in_options->start_time);
+ err = k5_ipc_stream_write_int64 (io_stream, options->start_time);
}
if (!err) {
- err = k5_ipc_stream_write_int64 (io_stream, in_options->lifetime);
+ err = k5_ipc_stream_write_int64 (io_stream, options->lifetime);
}
if (!err) {
- err = k5_ipc_stream_write_int32 (io_stream, in_options->renewable);
+ err = k5_ipc_stream_write_int32 (io_stream, options->renewable);
}
if (!err) {
err = k5_ipc_stream_write_int64 (io_stream,
- in_options->renewal_lifetime);
+ options->renewal_lifetime);
}
if (!err) {
- err = k5_ipc_stream_write_int32 (io_stream, in_options->forwardable);
+ err = k5_ipc_stream_write_int32 (io_stream, options->forwardable);
}
if (!err) {
- err = k5_ipc_stream_write_int32 (io_stream, in_options->proxiable);
+ err = k5_ipc_stream_write_int32 (io_stream, options->proxiable);
}
if (!err) {
- err = k5_ipc_stream_write_int32 (io_stream, in_options->addressless);
+ err = k5_ipc_stream_write_int32 (io_stream, options->addressless);
}
if (!err) {
- kim_string service_name = (in_options->service_name ?
- in_options->service_name : "");
+ kim_string service_name = (options->service_name ?
+ options->service_name : "");
err = k5_ipc_stream_write_string (io_stream, service_name);
}
- kim_options_free(&options);
+ if (options != in_options) { kim_options_free (&options); }
return check_error (err);
}