Compare commits
12 Commits
141da69bd2
...
2f2fc3ac4f
Author | SHA1 | Date |
---|---|---|
aks | 2f2fc3ac4f | |
Aron Podrigal | 5cb74797fe | |
aks | 3d4a9133b7 | |
aks | 028cd9d36e | |
aks | 1340dc8ca4 | |
aks | 93d5d3158b | |
aks | 88b80e6c94 | |
aks | efdd971c8f | |
aks | c302d6611c | |
aks | 68d6e5c6cb | |
aks | 187e40df5d | |
aks | f49f739333 |
|
@ -47,6 +47,9 @@ applications/mod_voicemail
|
|||
#asr_tts/mod_flite
|
||||
#asr_tts/mod_pocketsphinx
|
||||
#asr_tts/mod_tts_commandline
|
||||
#asr_tts/mod_google_tts
|
||||
#asr_tts/mod_openai_tts
|
||||
#asr_tts/mod_piper_tts
|
||||
codecs/mod_amr
|
||||
#codecs/mod_amrwb
|
||||
codecs/mod_b64
|
||||
|
|
|
@ -2137,6 +2137,9 @@ AC_CONFIG_FILES([Makefile
|
|||
src/mod/asr_tts/mod_flite/Makefile
|
||||
src/mod/asr_tts/mod_pocketsphinx/Makefile
|
||||
src/mod/asr_tts/mod_tts_commandline/Makefile
|
||||
src/mod/asr_tts/mod_google_tts/Makefile
|
||||
src/mod/asr_tts/mod_openai_tts/Makefile
|
||||
src/mod/asr_tts/mod_piper_tts/Makefile
|
||||
src/mod/codecs/mod_amr/Makefile
|
||||
src/mod/codecs/mod_amrwb/Makefile
|
||||
src/mod/codecs/mod_b64/Makefile
|
||||
|
|
|
@ -106,6 +106,22 @@ char * pgsql_handle_get_error(switch_pgsql_handle_t *handle)
|
|||
return err_str;
|
||||
}
|
||||
|
||||
void pgsql_handle_set_error_if_not_set(switch_pgsql_handle_t *handle, char **err)
|
||||
{
|
||||
char *err_str;
|
||||
|
||||
if (err && !(*err)) {
|
||||
err_str = pgsql_handle_get_error(handle);
|
||||
|
||||
if (zstr(err_str)) {
|
||||
switch_safe_free(err_str);
|
||||
err_str = strdup((char *)"SQL ERROR!");
|
||||
}
|
||||
|
||||
*err = err_str;
|
||||
}
|
||||
}
|
||||
|
||||
static int db_is_up(switch_pgsql_handle_t *handle)
|
||||
{
|
||||
int ret = 0;
|
||||
|
@ -553,8 +569,15 @@ switch_status_t pgsql_handle_exec_detailed(const char *file, const char *func, i
|
|||
goto error;
|
||||
}
|
||||
|
||||
return pgsql_finish_results(handle);
|
||||
if (pgsql_finish_results(handle) != SWITCH_STATUS_SUCCESS) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
error:
|
||||
pgsql_handle_set_error_if_not_set(handle, err);
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
@ -630,6 +653,7 @@ done:
|
|||
|
||||
pgsql_free_result(&result);
|
||||
if (pgsql_finish_results(handle) != SWITCH_STATUS_SUCCESS) {
|
||||
pgsql_handle_set_error_if_not_set(handle, err);
|
||||
sstatus = SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
@ -638,6 +662,7 @@ done:
|
|||
error:
|
||||
|
||||
pgsql_free_result(&result);
|
||||
pgsql_handle_set_error_if_not_set(handle, err);
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
@ -1050,6 +1075,8 @@ switch_status_t pgsql_handle_callback_exec_detailed(const char *file, const char
|
|||
return SWITCH_STATUS_SUCCESS;
|
||||
error:
|
||||
|
||||
pgsql_handle_set_error_if_not_set(handle, err);
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ hashtable_expand(switch_hashtable_t *h)
|
|||
realloc(h->table, newsize * sizeof(struct entry *));
|
||||
if (NULL == newtable) { (h->primeindex)--; return 0; }
|
||||
h->table = newtable;
|
||||
memset(newtable[h->tablelength], 0, newsize - h->tablelength);
|
||||
memset(&newtable[h->tablelength], 0, (newsize - h->tablelength) * sizeof(struct entry*));
|
||||
for (i = 0; i < h->tablelength; i++) {
|
||||
for (pE = &(newtable[i]), e = *pE; e != NULL; e = *pE) {
|
||||
index = indexFor(newsize,e->h);
|
||||
|
|
Loading…
Reference in New Issue