summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2010-09-03 08:53:54 +0200
committerPatrick McHardy <kaber@trash.net>2010-09-03 08:53:54 +0200
commitdc4ad237073a6c2e88fd09df6f1919e22967da27 (patch)
tree75857e9742e13ea17ef809c0fc601872890c8f59 /include
parent54f5b57e97e3429054fc6426980e341db84fd86f (diff)
libdect: make handle initialization/shutdown symetrical
Proper error handling on failed dect_init() calls is currently not possible since dect_close_handle() expects a fully initialized handle. Kill dect_alloc_handle() and add a dect_open_handle() function that performs all setup. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
-rw-r--r--include/dect/libdect.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/dect/libdect.h b/include/dect/libdect.h
index c0e8eff..825f0b2 100644
--- a/include/dect/libdect.h
+++ b/include/dect/libdect.h
@@ -162,11 +162,10 @@ struct dect_ops {
const struct dect_raw_ops *raw_ops;
};
-extern struct dect_handle *dect_alloc_handle(struct dect_ops *ops);
+extern struct dect_handle *dect_open_handle(struct dect_ops *ops,
+ const char *cluster);
extern void dect_close_handle(struct dect_handle *dh);
-extern int dect_init(struct dect_handle *dh, const char *cluster);
-
extern void dect_pp_set_ipui(struct dect_handle *dh,
const struct dect_ipui *ipui);
extern void dect_pp_set_tpui(struct dect_handle *dh,