diff options
author | Sean Bright <sean.bright@gmail.com> | 2017-12-22 09:14:07 -0500 |
---|---|---|
committer | Sean Bright <sean.bright@gmail.com> | 2017-12-22 09:14:07 -0500 |
commit | ce3d56920b15facbb64b3caf0d823a3f57c0dded (patch) | |
tree | 0ea4a13885afb281237b3747e85eb6315863ae0a /apps/app_sms.c | |
parent | 35a2e09c655f26067db0f51837704886d6ffff78 (diff) |
Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
Diffstat (limited to 'apps/app_sms.c')
-rw-r--r-- | apps/app_sms.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/apps/app_sms.c b/apps/app_sms.c index 385f47978..ce1746fdc 100644 --- a/apps/app_sms.c +++ b/apps/app_sms.c @@ -17,7 +17,7 @@ /*! \file * * \brief SMS application - ETSI ES 201 912 protocol 1 implementation - * + * * \par Development notes * \note The ETSI standards are available free of charge from ETSI at * http://pda.etsi.org/pda/queryform.asp @@ -26,7 +26,7 @@ * ES 201 912 SMS for PSTN/ISDN * TS 123 040 Technical realization of SMS * - * + * * \ingroup applications * * \author Adrian Kennard (for the original protocol 1 code) @@ -409,7 +409,7 @@ static int packsms7(unsigned char *o, int udhl, unsigned char *udh, int udl, uns for (v = 0; v < 128 && escapes[v] != u; v++); if (v < 128) { /* escaped sequence, esc + v */ /* store the low (8-b) bits in o[p], the remaining bits in o[p+1] */ - o[p] |= (27 << b); /* the low bits go into o[p] */ + o[p] |= (27 << b); /* the low bits go into o[p] */ b += 7; if (b >= 8) { b -= 8; @@ -472,13 +472,13 @@ static int packsms8(unsigned char *o, int udhl, unsigned char *udh, int udl, uns return p; } -/*! \brief takes a binary header (udhl bytes at udh) and UCS-2 - message (udl characters at ud) and packs in to o using 16 bit - UCS-2 character codes - The return value is the number of bytes packed in to o, which is - internally limited to 140 - o can be null, in which case this is used to validate or count - only if the input contains invalid characters then +/*! \brief takes a binary header (udhl bytes at udh) and UCS-2 + message (udl characters at ud) and packs in to o using 16 bit + UCS-2 character codes + The return value is the number of bytes packed in to o, which is + internally limited to 140 + o can be null, in which case this is used to validate or count + only if the input contains invalid characters then the return value is -1 */ static int packsms16(unsigned char *o, int udhl, unsigned char *udh, int udl, unsigned short *ud) { @@ -513,7 +513,7 @@ static int packsms16(unsigned char *o, int udhl, unsigned char *udh, int udl, un return p; } -/*! \brief general pack, with length and data, +/*! \brief general pack, with length and data, returns number of bytes of target used */ static int packsms(unsigned char dcs, unsigned char *base, unsigned int udhl, unsigned char *udh, int udl, unsigned short *ud) { @@ -521,7 +521,7 @@ static int packsms(unsigned char dcs, unsigned char *base, unsigned int udhl, un if (udl == 0) { *p++ = 0; /* no user data */ } else { - + int l = 0; if (is7bit(dcs)) { /* 7 bit */ if ((l = packsms7(p + 1, udhl, udh, udl, ud)) < 0) { @@ -594,8 +594,8 @@ static struct timeval unpackdate(unsigned char *i) return ast_mktime(&t, NULL); } -/*! \brief unpacks bytes (7 bit encoding) at i, len l septets, - and places in udh and ud setting udhl and udl. udh not used +/*! \brief unpacks bytes (7 bit encoding) at i, len l septets, + and places in udh and ud setting udhl and udl. udh not used if udhi not set */ static void unpacksms7(unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi) { @@ -649,8 +649,8 @@ static void unpacksms7(unsigned char *i, unsigned char l, unsigned char *udh, in *udl = (o - ud); } -/*! \brief unpacks bytes (8 bit encoding) at i, len l septets, - * and places in udh and ud setting udhl and udl. udh not used +/*! \brief unpacks bytes (8 bit encoding) at i, len l septets, + * and places in udh and ud setting udhl and udl. udh not used * if udhi not set. */ static void unpacksms8(unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi) @@ -677,7 +677,7 @@ static void unpacksms8(unsigned char *i, unsigned char l, unsigned char *udh, in } /*! \brief unpacks bytes (16 bit encoding) at i, len l septets, - and places in udh and ud setting udhl and udl. + and places in udh and ud setting udhl and udl. udh not used if udhi not set */ static void unpacksms16(unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi) { @@ -1433,7 +1433,7 @@ static void sms_compose1(sms_t *h, int more) /*! \brief find and fill in next message, or send a REL if none waiting */ static void sms_nextoutgoing (sms_t * h) -{ +{ char fn[100 + NAME_MAX] = ""; DIR *d; char more = 0; @@ -1942,7 +1942,7 @@ static int sms_exec(struct ast_channel *chan, const char *data) if (ast_test_flag(&flags, OPTION_DCS)) { h.dcs = 1; } -#if 0 +#if 0 case '1': case '2': case '3': @@ -1997,7 +1997,7 @@ static int sms_exec(struct ast_channel *chan, const char *data) res = h.err; goto done; } - + if (ast_channel_state(chan) != AST_STATE_UP) { /* make sure channel is answered before any TX */ ast_answer(chan); } @@ -2054,7 +2054,7 @@ static int sms_exec(struct ast_channel *chan, const char *data) } res = h.err; /* XXX */ - /* + /* * The SMS generator data is on the stack. We _MUST_ make sure the generator * is stopped before returning from this function. */ @@ -2083,4 +2083,3 @@ static int load_module(void) } AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "SMS/PSTN handler"); - |