summaryrefslogtreecommitdiff
path: root/main/udptl.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/udptl.c')
-rw-r--r--main/udptl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/main/udptl.c b/main/udptl.c
index a568cd1ec..83989f738 100644
--- a/main/udptl.c
+++ b/main/udptl.c
@@ -239,9 +239,9 @@ static int udptl_pre_apply_config(void);
static struct aco_type general_option = {
.type = ACO_GLOBAL,
.name = "global",
- .category_match = ACO_WHITELIST,
+ .category_match = ACO_WHITELIST_EXACT,
.item_offset = offsetof(struct udptl_config, general),
- .category = "^general$",
+ .category = "general",
};
static struct aco_type *general_options[] = ACO_TYPES(&general_option);
@@ -1014,7 +1014,6 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct ast_sched_context *sched, s
int x;
int startplace;
int i;
- long int flags;
RAII_VAR(struct udptl_config *, cfg, ao2_global_obj_ref(globals), ao2_cleanup);
if (!cfg || !cfg->general) {
@@ -1045,8 +1044,7 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct ast_sched_context *sched, s
ast_log(LOG_WARNING, "Unable to allocate socket: %s\n", strerror(errno));
return NULL;
}
- flags = fcntl(udptl->fd, F_GETFL);
- fcntl(udptl->fd, F_SETFL, flags | O_NONBLOCK);
+ ast_fd_set_flags(udptl->fd, O_NONBLOCK);
#ifdef SO_NO_CHECK
if (cfg->general->nochecksums)