summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-02 11:17:00 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-02 18:16:49 +0100
commit8bdc947993dd29d0480675464d548134c6f71ea7 (patch)
tree0696bb6db6351e59e4fff3a9271f31013d02c4fe /lib
parent0ffed7d992a50bff5f3bc89447418ed485dbccb0 (diff)
downloadsamba-8bdc947993dd29d0480675464d548134c6f71ea7.tar.gz
samba-8bdc947993dd29d0480675464d548134c6f71ea7.tar.bz2
samba-8bdc947993dd29d0480675464d548134c6f71ea7.zip
tevent: rename event_set_default_backend() => tevent_set_default_backend()
metze
Diffstat (limited to 'lib')
-rw-r--r--lib/tevent/tevent.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index 130bfaa665..94d71d490d 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -65,7 +65,7 @@ struct event_ops_list {
/* list of registered event backends */
static struct event_ops_list *event_backends = NULL;
-static char *event_default_backend = NULL;
+static char *tevent_default_backend = NULL;
/*
register an events backend
@@ -94,10 +94,11 @@ bool event_register_backend(const char *name, const struct event_ops *ops)
/*
set the default event backend
*/
-void event_set_default_backend(const char *backend)
+void tevent_set_default_backend(const char *backend)
{
- if (event_default_backend) free(event_default_backend);
- event_default_backend = strdup(backend);
+ talloc_free(tevent_default_backend);
+ tevent_default_backend = talloc_strdup(talloc_autofree_context(),
+ backend);
}
/*
@@ -177,7 +178,7 @@ struct tevent_context *event_context_init_byname(TALLOC_CTX *mem_ctx, const char
event_backend_init();
if (name == NULL) {
- name = event_default_backend;
+ name = tevent_default_backend;
}
if (name == NULL) {
name = "standard";