mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-14 21:38:34 +00:00
change switch_strlen_zero to zstr
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15211 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
410b6ebd1f
commit
df7637f687
96 files changed
+1033
-1033
No files matched your search
@@ -366,7 +366,7 @@ static void add_pvt(private_t *tech_pvt, int master)
|
||||
|
||||
switch_mutex_lock(globals.pvt_lock);
|
||||
|
||||
if (switch_strlen_zero(tech_pvt->call_id)) {
|
||||
if (zstr(tech_pvt->call_id)) {
|
||||
snprintf(tech_pvt->call_id, sizeof(tech_pvt->call_id), "%d", ++globals.call_id);
|
||||
switch_core_hash_insert(globals.call_hash, tech_pvt->call_id, tech_pvt);
|
||||
switch_core_session_set_read_codec(tech_pvt->session, &globals.read_codec);
|
||||
@@ -785,7 +785,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
||||
|
||||
if (outbound_profile) {
|
||||
char name[128];
|
||||
const char *id = !switch_strlen_zero(outbound_profile->caller_id_number) ? outbound_profile->caller_id_number : "na";
|
||||
const char *id = !zstr(outbound_profile->caller_id_number) ? outbound_profile->caller_id_number : "na";
|
||||
snprintf(name, sizeof(name), "alsa/%s", id);
|
||||
|
||||
switch_channel_set_name(channel, name);
|
||||
@@ -1186,7 +1186,7 @@ static switch_status_t dtmf_call(char **argv, int argc, switch_stream_handle_t *
|
||||
char *dtmf_str = argv[0];
|
||||
switch_dtmf_t dtmf = { 0, switch_core_default_dtmf_duration(0) };
|
||||
|
||||
if (switch_strlen_zero(dtmf_str)) {
|
||||
if (zstr(dtmf_str)) {
|
||||
stream->write_function(stream, "No DTMF Supplied!\n");
|
||||
} else {
|
||||
switch_mutex_lock(globals.pvt_lock);
|
||||
@@ -1212,7 +1212,7 @@ static switch_status_t switch_call(char **argv, int argc, switch_stream_handle_t
|
||||
uint8_t one_call = 0;
|
||||
|
||||
switch_mutex_lock(globals.pvt_lock);
|
||||
if (switch_strlen_zero(callid)) {
|
||||
if (zstr(callid)) {
|
||||
if (globals.call_list) {
|
||||
if (globals.call_list->next) {
|
||||
tech_pvt = globals.call_list->next;
|
||||
@@ -1258,7 +1258,7 @@ static switch_status_t hangup_call(char **argv, int argc, switch_stream_handle_t
|
||||
char *callid = argv[0];
|
||||
|
||||
switch_mutex_lock(globals.pvt_lock);
|
||||
if (switch_strlen_zero(callid)) {
|
||||
if (zstr(callid)) {
|
||||
tech_pvt = globals.call_list;
|
||||
} else {
|
||||
tech_pvt = switch_core_hash_find(globals.call_hash, callid);
|
||||
@@ -1285,7 +1285,7 @@ static switch_status_t answer_call(char **argv, int argc, switch_stream_handle_t
|
||||
|
||||
switch_mutex_lock(globals.pvt_lock);
|
||||
|
||||
if (!switch_strlen_zero(callid)) {
|
||||
if (!zstr(callid)) {
|
||||
if ((tp = switch_core_hash_find(globals.call_hash, callid))) {
|
||||
if (switch_test_flag(tp, TFLAG_ANSWER)) {
|
||||
stream->write_function(stream, "CALL ALREADY ANSWERED\n");
|
||||
@@ -1458,23 +1458,23 @@ static switch_status_t place_call(char **argv, int argc, switch_stream_handle_t
|
||||
return SWITCH_STATUS_MEMERR;
|
||||
}
|
||||
|
||||
if (!switch_strlen_zero(argv[1])) {
|
||||
if (!zstr(argv[1])) {
|
||||
dialplan = argv[1];
|
||||
}
|
||||
|
||||
if (!switch_strlen_zero(argv[2])) {
|
||||
if (!zstr(argv[2])) {
|
||||
cid_num = argv[2];
|
||||
}
|
||||
|
||||
if (!switch_strlen_zero(argv[3])) {
|
||||
if (!zstr(argv[3])) {
|
||||
cid_name = argv[3];
|
||||
}
|
||||
|
||||
if (!switch_strlen_zero(argv[4])) {
|
||||
if (!zstr(argv[4])) {
|
||||
tech_pvt->sample_rate = atoi(argv[4]);
|
||||
}
|
||||
|
||||
if (!switch_strlen_zero(argv[5])) {
|
||||
if (!zstr(argv[5])) {
|
||||
tech_pvt->codec_ms = atoi(argv[5]);
|
||||
}
|
||||
|
||||
@@ -1576,13 +1576,13 @@ SWITCH_STANDARD_API(pa_cmd)
|
||||
}
|
||||
}
|
||||
|
||||
if (switch_strlen_zero(cmd)) {
|
||||
if (zstr(cmd)) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (switch_strlen_zero(cmd)) {
|
||||
if (zstr(cmd)) {
|
||||
stream->write_function(stream, "%s", usage_string);
|
||||
goto done;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user