diff options
| author | Tobias Brunner <tobias@strongswan.org> | 2011-10-03 18:56:21 +0200 |
|---|---|---|
| committer | Tobias Brunner <tobias@strongswan.org> | 2011-10-03 18:56:21 +0200 |
| commit | 0d430d4f54c2f809d334b52e220ee962b78faa27 (patch) | |
| tree | 42852080dc2e3aca159ed49cda49a6eacc4dc30c /src/libcharon/plugins/stroke | |
| parent | a36e175adee0787f982f3c2c0ad43ef01e7d5337 (diff) | |
| download | strongswan-0d430d4f54c2f809d334b52e220ee962b78faa27.tar.bz2 strongswan-0d430d4f54c2f809d334b52e220ee962b78faa27.tar.xz | |
Migrated stroke_socket_t to INIT/METHOD macros.
Diffstat (limited to 'src/libcharon/plugins/stroke')
| -rw-r--r-- | src/libcharon/plugins/stroke/stroke_socket.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_socket.c b/src/libcharon/plugins/stroke/stroke_socket.c index 7b38c6606..3fd21d213 100644 --- a/src/libcharon/plugins/stroke/stroke_socket.c +++ b/src/libcharon/plugins/stroke/stroke_socket.c @@ -680,10 +680,8 @@ static bool open_socket(private_stroke_socket_t *this) return TRUE; } -/** - * Implementation of stroke_socket_t.destroy - */ -static void destroy(private_stroke_socket_t *this) +METHOD(stroke_socket_t, destroy, void, + private_stroke_socket_t *this) { this->job->cancel(this->job); lib->credmgr->remove_set(lib->credmgr, &this->ca->set); @@ -704,9 +702,13 @@ static void destroy(private_stroke_socket_t *this) */ stroke_socket_t *stroke_socket_create() { - private_stroke_socket_t *this = malloc_thing(private_stroke_socket_t); + private_stroke_socket_t *this; - this->public.destroy = (void(*)(stroke_socket_t*))destroy; + INIT(this, + .public = { + .destroy = _destroy, + }, + ); if (!open_socket(this)) { |
