diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | addons/res_config_mysql.c | 66 | ||||
-rw-r--r-- | apps/app_voicemail.c | 5 | ||||
-rw-r--r-- | channels/sig_pri.c | 10 |
4 files changed, 46 insertions, 37 deletions
@@ -942,7 +942,7 @@ nmenuselect: menuselect/nmenuselect menuselect-tree menuselect.makeopts -@menuselect/nmenuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!" # options for make in menuselect/ -MAKE_MENUSELECT=CC="$(CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" \ +MAKE_MENUSELECT=CC="$(BUILD_CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" \ CFLAGS="$(BUILD_CFLAGS)" LDFLAGS="$(BUILD_LDFLAGS)" \ $(MAKE) -C menuselect CONFIGURE_SILENT="--silent" diff --git a/addons/res_config_mysql.c b/addons/res_config_mysql.c index 640e06ef8..6e6224b8d 100644 --- a/addons/res_config_mysql.c +++ b/addons/res_config_mysql.c @@ -1202,38 +1202,44 @@ static int require_mysql(const char *database, const char *tablename, va_list ap PICK_WHICH_ALTER_ACTION(bigint) } } - } else if (strncmp(column->type, "float", 5) == 0 && !ast_rq_is_int(type) && type != RQ_FLOAT) { - if (table->database->requirements == RQ_WARN) { - ast_log(LOG_WARNING, "Realtime table %s@%s: Column %s cannot be a %s\n", tablename, database, column->name, column->type); - res = -1; - } else if (table->database->requirements == RQ_CREATECLOSE && modify_mysql(database, tablename, column, type, size) == 0) { - table_altered = 1; - } else if (table->database->requirements == RQ_CREATECHAR && modify_mysql(database, tablename, column, RQ_CHAR, size) == 0) { - table_altered = 1; - } else { - res = -1; + } else if (strncmp(column->type, "float", 5) == 0) { + if (!ast_rq_is_int(type) && type != RQ_FLOAT) { + if (table->database->requirements == RQ_WARN) { + ast_log(LOG_WARNING, "Realtime table %s@%s: Column %s cannot be a %s\n", tablename, database, column->name, column->type); + res = -1; + } else if (table->database->requirements == RQ_CREATECLOSE && modify_mysql(database, tablename, column, type, size) == 0) { + table_altered = 1; + } else if (table->database->requirements == RQ_CREATECHAR && modify_mysql(database, tablename, column, RQ_CHAR, size) == 0) { + table_altered = 1; + } else { + res = -1; + } } - } else if ((strncmp(column->type, "datetime", 8) == 0 || strncmp(column->type, "timestamp", 9) == 0) && type != RQ_DATETIME) { - if (table->database->requirements == RQ_WARN) { - ast_log(LOG_WARNING, "Realtime table %s@%s: Column %s cannot be a %s\n", tablename, database, column->name, column->type); - res = -1; - } else if (table->database->requirements == RQ_CREATECLOSE && modify_mysql(database, tablename, column, type, size) == 0) { - table_altered = 1; - } else if (table->database->requirements == RQ_CREATECHAR && modify_mysql(database, tablename, column, RQ_CHAR, size) == 0) { - table_altered = 1; - } else { - res = -1; + } else if (strncmp(column->type, "datetime", 8) == 0 || strncmp(column->type, "timestamp", 9) == 0) { + if (type != RQ_DATETIME) { + if (table->database->requirements == RQ_WARN) { + ast_log(LOG_WARNING, "Realtime table %s@%s: Column %s cannot be a %s\n", tablename, database, column->name, column->type); + res = -1; + } else if (table->database->requirements == RQ_CREATECLOSE && modify_mysql(database, tablename, column, type, size) == 0) { + table_altered = 1; + } else if (table->database->requirements == RQ_CREATECHAR && modify_mysql(database, tablename, column, RQ_CHAR, size) == 0) { + table_altered = 1; + } else { + res = -1; + } } - } else if ((strncmp(column->type, "date", 4) == 0) && type != RQ_DATE) { - if (table->database->requirements == RQ_WARN) { - ast_log(LOG_WARNING, "Realtime table %s@%s: Column %s cannot be a %s\n", tablename, database, column->name, column->type); - res = -1; - } else if (table->database->requirements == RQ_CREATECLOSE && modify_mysql(database, tablename, column, type, size) == 0) { - table_altered = 1; - } else if (table->database->requirements == RQ_CREATECHAR && modify_mysql(database, tablename, column, RQ_CHAR, size) == 0) { - table_altered = 1; - } else { - res = -1; + } else if (strncmp(column->type, "date", 4) == 0) { + if (type != RQ_DATE) { + if (table->database->requirements == RQ_WARN) { + ast_log(LOG_WARNING, "Realtime table %s@%s: Column %s cannot be a %s\n", tablename, database, column->name, column->type); + res = -1; + } else if (table->database->requirements == RQ_CREATECLOSE && modify_mysql(database, tablename, column, type, size) == 0) { + table_altered = 1; + } else if (table->database->requirements == RQ_CREATECHAR && modify_mysql(database, tablename, column, RQ_CHAR, size) == 0) { + table_altered = 1; + } else { + res = -1; + } } } else { /* Other, possibly unsupported types? */ if (table->database->requirements == RQ_WARN) { diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 620b76732..19bd896af 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -617,6 +617,7 @@ static AST_LIST_HEAD_STATIC(vmstates, vmstate); #define VM_MESSAGEWRAP (1 << 17) /*!< Wrap around from the last message to the first, and vice-versa */ #define VM_FWDURGAUTO (1 << 18) /*!< Autoset of Urgent flag on forwarded Urgent messages set globally */ #define ERROR_LOCK_PATH -100 +#define ERROR_MAX_MSGS -101 #define OPERATOR_EXIT 300 enum vm_box { @@ -7093,7 +7094,7 @@ static int save_to_folder(struct ast_vm_user *vmu, struct vm_state *vms, int msg } else { if (x >= vmu->maxmsg) { ast_unlock_path(ddir); - return -1; + return ERROR_MAX_MSGS; } } make_file(sfn, sizeof(sfn), dir, msg); @@ -8918,7 +8919,7 @@ static int close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu) } else if ((!strcasecmp(vms->curbox, "INBOX") || !strcasecmp(vms->curbox, "Urgent")) && vms->heard[x] && ast_test_flag(vmu, VM_MOVEHEARD) && !vms->deleted[x]) { /* Move to old folder before deleting */ res = save_to_folder(vmu, vms, x, 1, NULL, 0); - if (res == ERROR_LOCK_PATH) { + if (res == ERROR_LOCK_PATH || res == ERROR_MAX_MSGS) { /* If save failed do not delete the message */ ast_log(AST_LOG_WARNING, "Save failed. Not moving message: %s.\n", res == ERROR_LOCK_PATH ? "unable to lock path" : "destination folder full"); vms->deleted[x] = 0; diff --git a/channels/sig_pri.c b/channels/sig_pri.c index a66d16b53..2815dac13 100644 --- a/channels/sig_pri.c +++ b/channels/sig_pri.c @@ -7102,10 +7102,11 @@ static void *pri_dchannel(void *vpri) break; } if (pri->pvts[chanpos]->owner) { - int do_hangup = 0; - snprintf(cause_str, sizeof(cause_str), "PRI PRI_EVENT_HANGUP (%d)", e->hangup.cause); pri_queue_pvt_cause_data(pri, chanpos, cause_str, e->hangup.cause); + } + if (pri->pvts[chanpos]->owner) { + int do_hangup = 0; /* Queue a BUSY instead of a hangup if our cause is appropriate */ ast_channel_hangupcause_set(pri->pvts[chanpos]->owner, e->hangup.cause); @@ -7246,10 +7247,11 @@ static void *pri_dchannel(void *vpri) break; } if (pri->pvts[chanpos]->owner) { - int do_hangup = 0; - snprintf(cause_str, sizeof(cause_str), "PRI PRI_EVENT_HANGUP_REQ (%d)", e->hangup.cause); pri_queue_pvt_cause_data(pri, chanpos, cause_str, e->hangup.cause); + } + if (pri->pvts[chanpos]->owner) { + int do_hangup = 0; ast_channel_hangupcause_set(pri->pvts[chanpos]->owner, e->hangup.cause); switch (ast_channel_state(pri->pvts[chanpos]->owner)) { |