|
|
@ -75,7 +75,7 @@ static char txqcheck (char *dir, char *queue, char subaddress, char *channel, ch
|
|
|
|
*p=NULL;
|
|
|
|
*p=NULL;
|
|
|
|
FILE *f;
|
|
|
|
FILE *f;
|
|
|
|
DIR *d;
|
|
|
|
DIR *d;
|
|
|
|
int ql = strlen (queue);
|
|
|
|
int ql = strlen (queue), qfl = ql;
|
|
|
|
struct dirent *fn;
|
|
|
|
struct dirent *fn;
|
|
|
|
snprintf (dirname, sizeof(dirname), "sms/%s", dir);
|
|
|
|
snprintf (dirname, sizeof(dirname), "sms/%s", dir);
|
|
|
|
d = opendir (dirname);
|
|
|
|
d = opendir (dirname);
|
|
|
@ -92,7 +92,7 @@ static char txqcheck (char *dir, char *queue, char subaddress, char *channel, ch
|
|
|
|
if (!ql)
|
|
|
|
if (!ql)
|
|
|
|
{ /* not searching any specific queue, so use whatr we found as the queue */
|
|
|
|
{ /* not searching any specific queue, so use whatr we found as the queue */
|
|
|
|
queue = fn->d_name;
|
|
|
|
queue = fn->d_name;
|
|
|
|
ql = p - queue;
|
|
|
|
qfl = ql = p - queue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
p = strchr (queue, '-');
|
|
|
|
p = strchr (queue, '-');
|
|
|
|
if (p && p < queue + ql)
|
|
|
|
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, ">\n");
|
|
|
|
fprintf (f, "Application: SMS\n");
|
|
|
|
fprintf (f, "Application: SMS\n");
|
|
|
|
fprintf (f, "Data: %.*s", ql, queue);
|
|
|
|
fprintf (f, "Data: %.*s", qfl, queue);
|
|
|
|
if (dir[1] == 't')
|
|
|
|
if (dir[1] == 't')
|
|
|
|
fprintf (f, "|s");
|
|
|
|
fprintf (f, "|s");
|
|
|
|
fprintf (f, "\nMaxRetries: %d\n", retries);
|
|
|
|
fprintf (f, "\nMaxRetries: %d\n", retries);
|
|
|
|