mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 21:22:09 +00:00
fix for everyone
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5489 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -55,8 +55,9 @@ static switch_status_t switch_raw_encode(switch_codec_t *codec,
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
printf("WTF %d %d\n", codec->implementation->samples_per_second , other_codec->implementation->samples_per_second );
|
||||
/* NOOP indicates that the audio in is already the same as the audio out, so no conversion was necessary. */
|
||||
if (codec && other_codec && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
if (codec && other_codec && codec->implementation && other_codec->implementation && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
memcpy(encoded_data, decoded_data, decoded_data_len);
|
||||
*encoded_data_len = decoded_data_len;
|
||||
return SWITCH_STATUS_RESAMPLE;
|
||||
@@ -71,7 +72,7 @@ static switch_status_t switch_raw_decode(switch_codec_t *codec,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
if (codec && other_codec && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
if (codec && other_codec && codec->implementation && other_codec->implementation && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
memcpy(decoded_data, encoded_data, encoded_data_len);
|
||||
*decoded_data_len = encoded_data_len;
|
||||
return SWITCH_STATUS_RESAMPLE;
|
||||
|
||||
@@ -756,7 +756,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
|
||||
free(sql);
|
||||
sql = switch_mprintf("insert into sip_subscriptions values ('%q','%q','%q','%q','%q','%q','%q','%q','%q','%q',%ld)",
|
||||
proto, from_user, from_host, to_user, to_host, event, contact_str, call_id, full_from, full_via, exp);
|
||||
|
||||
|
||||
assert(sql != NULL);
|
||||
sofia_glue_execute_sql(profile, SWITCH_FALSE, sql, NULL);
|
||||
free(sql);
|
||||
@@ -775,6 +775,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
|
||||
|
||||
|
||||
|
||||
|
||||
switch_safe_free(sstr);
|
||||
|
||||
if ((sql = switch_mprintf("select * from sip_subscriptions where user='%q' and host='%q'", to_user, to_host, to_user, to_host))) {
|
||||
|
||||
Reference in New Issue
Block a user