[Asterisk-cvs] asterisk/utils smsq.c,1.3,1.4

markster at lists.digium.com markster at lists.digium.com
Fri Jan 14 09:17:06 CST 2005


Update of /usr/cvsroot/asterisk/utils
In directory mongoose.digium.com:/tmp/cvs-serv28261/utils

Modified Files:
	smsq.c 
Log Message:
Fix small issue with smsq and sub addresses (bug #3338)


Index: smsq.c
===================================================================
RCS file: /usr/cvsroot/asterisk/utils/smsq.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- smsq.c	19 Dec 2004 21:13:41 -0000	1.3
+++ smsq.c	14 Jan 2005 15:20:56 -0000	1.4
@@ -75,7 +75,7 @@
     *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 @@
    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 @@
    }
    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);




More information about the svn-commits mailing list