|
|
@ -693,7 +693,7 @@ static void sms_readfile (sms_t * h, char *fn)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
while (fgets (line, sizeof (line), s))
|
|
|
|
while (fgets (line, sizeof (line), s))
|
|
|
|
{ /* process line in file */
|
|
|
|
{ /* process line in file */
|
|
|
|
unsigned char *p;
|
|
|
|
char *p;
|
|
|
|
for (p = line; *p && *p != '\n' && *p != '\r'; p++);
|
|
|
|
for (p = line; *p && *p != '\n' && *p != '\r'; p++);
|
|
|
|
*p = 0; /* strip eoln */
|
|
|
|
*p = 0; /* strip eoln */
|
|
|
|
p = line;
|
|
|
|
p = line;
|
|
|
@ -713,7 +713,7 @@ static void sms_readfile (sms_t * h, char *fn)
|
|
|
|
{ /* parse message (UTF-8) */
|
|
|
|
{ /* parse message (UTF-8) */
|
|
|
|
unsigned char o = 0;
|
|
|
|
unsigned char o = 0;
|
|
|
|
while (*p && o < SMSLEN)
|
|
|
|
while (*p && o < SMSLEN)
|
|
|
|
h->ud[o++] = utf8decode(&p);
|
|
|
|
h->ud[o++] = utf8decode((unsigned char **) &p);
|
|
|
|
h->udl = o;
|
|
|
|
h->udl = o;
|
|
|
|
if (*p)
|
|
|
|
if (*p)
|
|
|
|
ast_log (LOG_WARNING, "UD too long in %s\n", fn);
|
|
|
|
ast_log (LOG_WARNING, "UD too long in %s\n", fn);
|
|
|
|