struct ast_context *c = NULL;
if (pos == 2) { /* "dont include _X_" */
- if (ast_lock_contexts()) {
+ if (ast_wrlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
return NULL;
}
}
strsep(&dupline, " ");
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock contexts list\n");
free(context);
return NULL;
return NULL;
}
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
free(context);
return NULL;
struct ast_context *c = NULL;
if (pos == 3) { /* "dialplan remove include _X_" */
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
return NULL;
}
}
strsep(&dupline, " ");
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock contexts list\n");
free(context);
return NULL;
return NULL;
}
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
free(context);
return NULL;
le = strlen(exten);
lc = strlen(context);
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
goto error2;
}
if (le == 0 || lc == 0)
goto error3;
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
goto error3;
}
le = strlen(exten);
lc = strlen(context);
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
goto error2;
}
if (le == 0 || lc == 0)
goto error3;
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
goto error3;
}
int len = strlen(word);
if (pos == 2) { /* 'include context _X_' (context) ... */
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
return NULL;
}
strsep(&dupline, " ");
/* check for context existence ... */
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
/* our fault, we can't check, so complete 'in' ... */
ret = strdup("in");
goto error3;
}
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
goto error3;
}
int len = strlen(word);
if (pos == 3) { /* 'dialplan add include _X_' (context) ... */
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
return NULL;
}
strsep(&dupline, " ");
/* check for context existence ... */
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
/* our fault, we can't check, so complete 'into' ... */
ret = strdup("into");
goto error3;
}
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock context list\n");
goto error3;
}
cfg = ast_config_load("extensions.conf");
/* try to lock contexts list */
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_cli(fd, "Failed to lock contexts list\n");
ast_mutex_unlock(&save_dialplan_lock);
ast_config_destroy(cfg);
char *res = NULL;
/* try to lock contexts list ... */
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_WARNING, "Failed to lock contexts list\n");
return NULL;
}
char *res = NULL;
/* try to lock contexts list ... */
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_WARNING, "Failed to lock contexts list\n");
return NULL;
}
}
ignorepat = strsep(&dupline, " ");
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock contexts list\n");
return NULL;
}
}
ignorepat = strsep(&dupline, " ");
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_ERROR, "Failed to lock contexts list\n");
return NULL;
}
if (pos == 2) {
int len = strlen(word);
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_WARNING, "Failed to lock contexts list\n");
return NULL;
}
return NULL;
}
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_WARNING, "Failed to lock contexts list\n");
free(dupline);
return NULL;
if (pos == 3) {
int len = strlen(word);
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_WARNING, "Failed to lock contexts list\n");
return NULL;
}
return NULL;
}
- if (ast_lock_contexts()) {
+ if (ast_rdlock_contexts()) {
ast_log(LOG_WARNING, "Failed to lock contexts list\n");
free(dupline);
return NULL;