Skip to content
Snippets Groups Projects
Commit 8eab29c4 authored by Mark Spencer's avatar Mark Spencer
Browse files

Fix small issue with smsq and sub addresses (bug #3338)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent b1953951
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment