From: Seven Du Date: Sun, 17 Nov 2013 13:18:06 +0000 (+0800) Subject: do not treat key exists as error as already doing in other place X-Git-Tag: v1.5.7~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd67bd41f9e3bc050d465d937ff6843a609e791d;p=thirdparty%2Ffreeswitch.git do not treat key exists as error as already doing in other place --- diff --git a/src/switch_pgsql.c b/src/switch_pgsql.c index 9917ea2653..20fe886193 100644 --- a/src/switch_pgsql.c +++ b/src/switch_pgsql.c @@ -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; }