diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-01-14 15:20:56 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-01-14 15:20:56 +0000 |
commit | fd1e6079a80626f9fcffe06b12444d05aa3b70ae (patch) | |
tree | 3cb816570c2737a144be813e6771903a449dafe8 /utils | |
parent | 6b7e1b84bc54c0eb5871faade96dcf528d2da961 (diff) |
Fix small issue with smsq and sub addresses (bug #3338)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4791 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/smsq.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/smsq.c b/utils/smsq.c index 0ae965ccc..21d9f6247 100755 --- a/utils/smsq.c +++ b/utils/smsq.c @@ -75,7 +75,7 @@ static char txqcheck (char *dir, char *queue, char subaddress, char *channel, ch *p=NULL; FILE *f; DIR *d; - int ql = strlen (queue); + int ql = strlen (queue), qfl = ql; struct dirent *fn; snprintf (dirname, sizeof(dirname), "sms/%s", dir); d = opendir (dirname); @@ -92,7 +92,7 @@ static char txqcheck (char *dir, char *queue, char subaddress, char *channel, ch if (!ql) { /* not searching any specific queue, so use whatr we found as the queue */ queue = fn->d_name; - ql = p - queue; + qfl = ql = p - queue; } p = strchr (queue, '-'); if (p && p < queue + ql) @@ -135,7 +135,7 @@ static char txqcheck (char *dir, char *queue, char subaddress, char *channel, ch } fprintf (f, ">\n"); fprintf (f, "Application: SMS\n"); - fprintf (f, "Data: %.*s", ql, queue); + fprintf (f, "Data: %.*s", qfl, queue); if (dir[1] == 't') fprintf (f, "|s"); fprintf (f, "\nMaxRetries: %d\n", retries); |