]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
supress overly chatty err msg
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 12 Jul 2011 02:35:50 +0000 (21:35 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 12 Jul 2011 02:35:50 +0000 (21:35 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia.c

index c241305fbb4f3dd1801f163564cad7da76183a0b..3350b7b7f83d0e29e34f3190589f44aaebb2a3e8 100644 (file)
@@ -317,8 +317,8 @@ typedef enum {
        TFLAG_MAX
 } TFLAGS;
 
-#define SOFIA_MAX_MSG_QUEUE 250
-#define SOFIA_MSG_QUEUE_SIZE 50
+#define SOFIA_MAX_MSG_QUEUE 26
+#define SOFIA_MSG_QUEUE_SIZE 20
 
 struct mod_sofia_globals {
        switch_memory_pool_t *pool;
index ddb7f6dc3116ab0e6826f9d174125e678ac87b91..8817062e590cd2d56807a5332c347041d51c4db5 100644 (file)
@@ -859,7 +859,7 @@ static void our_sofia_event_callback(nua_event_t event,
                if (sess_count >= sess_max || !sofia_test_pflag(profile, PFLAG_RUNNING) || !switch_core_ready()) {
                        nua_respond(nh, 503, "Maximum Calls In Progress", SIPTAG_RETRY_AFTER_STR("300"), TAG_END());
 
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "No more sessions allowed at this time.\n");
+                       //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "No more sessions allowed at this time.\n");
 
                        goto done;
                }
@@ -3575,11 +3575,15 @@ switch_status_t config_sofia(int reload, char *profile_name)
                                        } else if (!strcasecmp(var, "message-threads")) {
                                                int num = atoi(val);
 
-                                               if (num < 1 || num >= SOFIA_MAX_MSG_QUEUE) {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "message-threads must be between 1 and %d", SOFIA_MAX_MSG_QUEUE);
-                                               } else {
-                                                       sofia_msg_thread_start(num);
-                                               }
+                                               if (num < 1 || num > SOFIA_MAX_MSG_QUEUE - 1) {
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "message-threads must be between 1 and %d", SOFIA_MAX_MSG_QUEUE -1);
+                                               } 
+
+                                               if (num < 1) num = 1;
+                                               if (num > SOFIA_MAX_MSG_QUEUE - 1) num = SOFIA_MAX_MSG_QUEUE -1;
+
+                                               sofia_msg_thread_start(num);
+                                               
 
                                        } else if (!strcasecmp(var, "disable-hold")) {
                                                if (switch_true(val)) {