]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix SQL queue manager so it actually stores and executes the pre and post transaction...
authorEliot Gable <egable@gmail.com>
Fri, 18 Jan 2013 22:06:30 +0000 (22:06 +0000)
committerEliot Gable <egable@gmail.com>
Fri, 18 Jan 2013 22:06:30 +0000 (22:06 +0000)
src/switch_core_sqldb.c

index ad12fdb56c7cd0e0ae2b20b411f0b6322691a25b..64e72c1bbb1ebf9dbf3b53b381beb1d04a350c79 100644 (file)
@@ -1514,10 +1514,16 @@ SWITCH_DECLARE(switch_status_t) switch_sql_queue_manager_init_name(const char *n
        }
 
        if (pre_trans_execute) {
-               qm->pre_trans_execute = switch_core_strdup(qm->pool, qm->pre_trans_execute);
-               qm->post_trans_execute = switch_core_strdup(qm->pool, qm->post_trans_execute);
-               qm->inner_pre_trans_execute = switch_core_strdup(qm->pool, qm->inner_pre_trans_execute);
-               qm->inner_post_trans_execute = switch_core_strdup(qm->pool, qm->inner_post_trans_execute);
+               qm->pre_trans_execute = switch_core_strdup(qm->pool, pre_trans_execute);
+       }
+       if (post_trans_execute) {
+               qm->post_trans_execute = switch_core_strdup(qm->pool, post_trans_execute);
+       }
+       if (inner_pre_trans_execute) {
+               qm->inner_pre_trans_execute = switch_core_strdup(qm->pool, inner_pre_trans_execute);
+       }
+       if (inner_post_trans_execute) {
+               qm->inner_post_trans_execute = switch_core_strdup(qm->pool, inner_post_trans_execute);
        }
 
        *qmp = qm;