mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
reduce indentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1691,24 +1691,22 @@ static int sms_exec (struct ast_channel *chan, void *data)
|
|||||||
struct ast_module_user *u;
|
struct ast_module_user *u;
|
||||||
struct ast_frame *f;
|
struct ast_frame *f;
|
||||||
sms_t h = { 0 };
|
sms_t h = { 0 };
|
||||||
|
unsigned char *p;
|
||||||
|
unsigned char *d = data;
|
||||||
|
int answer = 0;
|
||||||
|
|
||||||
u = ast_module_user_add(chan);
|
|
||||||
|
|
||||||
h.ipc0 = h.ipc1 = 20; /* phase for cosine */
|
|
||||||
h.dcs = 0xF1; /* default */
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
ast_log (LOG_ERROR, "Requires queue name at least\n");
|
ast_log (LOG_ERROR, "Requires queue name at least\n");
|
||||||
ast_module_user_remove(u);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u = ast_module_user_add(chan);
|
||||||
|
h.ipc0 = h.ipc1 = 20; /* phase for cosine */
|
||||||
|
h.dcs = 0xF1; /* default */
|
||||||
|
|
||||||
if (chan->cid.cid_num)
|
if (chan->cid.cid_num)
|
||||||
ast_copy_string (h.cli, chan->cid.cid_num, sizeof (h.cli));
|
ast_copy_string (h.cli, chan->cid.cid_num, sizeof (h.cli));
|
||||||
|
|
||||||
{
|
|
||||||
unsigned char *p;
|
|
||||||
unsigned char *d = data,
|
|
||||||
answer = 0;
|
|
||||||
if (!*d || *d == '|') {
|
if (!*d || *d == '|') {
|
||||||
ast_log (LOG_ERROR, "Requires queue name\n");
|
ast_log (LOG_ERROR, "Requires queue name\n");
|
||||||
ast_module_user_remove(u);
|
ast_module_user_remove(u);
|
||||||
@@ -1727,7 +1725,7 @@ static int sms_exec (struct ast_channel *chan, void *data)
|
|||||||
for (p = (unsigned char *)h.queue; *p; p++)
|
for (p = (unsigned char *)h.queue; *p; p++)
|
||||||
if (!isalnum (*p))
|
if (!isalnum (*p))
|
||||||
*p = '-'; /* make very safe for filenames */
|
*p = '-'; /* make very safe for filenames */
|
||||||
ast_log(LOG_NOTICE, "sms to queue %s\n", h.queue);
|
|
||||||
while (*d && *d != '|') {
|
while (*d && *d != '|') {
|
||||||
switch (*d) {
|
switch (*d) {
|
||||||
case 'a': /* we have to send the initial FSK sequence */
|
case 'a': /* we have to send the initial FSK sequence */
|
||||||
@@ -1806,7 +1804,6 @@ ast_log(LOG_NOTICE, "sms to queue %s\n", h.queue);
|
|||||||
}
|
}
|
||||||
sms_messagetx (&h);
|
sms_messagetx (&h);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (chan->_state != AST_STATE_UP)
|
if (chan->_state != AST_STATE_UP)
|
||||||
ast_answer (chan);
|
ast_answer (chan);
|
||||||
|
|||||||
Reference in New Issue
Block a user