]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
do not treat key exists as error as already doing in other place
authorSeven Du <dujinfang@gmail.com>
Sun, 17 Nov 2013 13:18:06 +0000 (21:18 +0800)
committerSeven Du <dujinfang@gmail.com>
Sun, 17 Nov 2013 13:27:39 +0000 (21:27 +0800)
src/switch_pgsql.c

index 9917ea2653a31be006131882af9eb043312efa00..20fe886193e535326b7997d163358024140fb746 100644 (file)
@@ -461,7 +461,7 @@ SWITCH_DECLARE(switch_pgsql_status_t) switch_pgsql_finish_results_real(const cha
        int done = 0;
        do {
                switch_pgsql_next_result(handle, &res);
-               if (res && res->err) {
+               if (res && res->err && !switch_stristr("already exists", res->err) && !switch_stristr("duplicate key name", res->err)) {
                        switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_ERROR, "Error executing query:\n%s\n", res->err);
                        final_status = SWITCH_PGSQL_FAIL;
                }