[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
quoting fix for smsd/mysql.c update multipartinbox
From: |
Paulius Bulotas |
Subject: |
quoting fix for smsd/mysql.c update multipartinbox |
Date: |
Thu, 24 Dec 2009 16:46:23 +0200 |
Hello,
when inserting multipart sms number is not quoted as in other places,
and smsd exits :)
mysql> UPDATE multipartinbox SET processed = 1
WHERE number=LABAS AND refnum=34 AND maxnum=3;
ERROR 1054 (42S22): Unknown column 'LABAS' in 'where clause'
--- smsd/mysql.c.orig 2009-12-24 16:39:34.000000000 +0200
+++ smsd/mysql.c 2009-12-24 16:39:56.000000000 +0200
@@ -236,7 +236,7 @@
}
g_free(tmpText);
g_string_printf(buf, "UPDATE multipartinbox SET processed = 1 \
- WHERE number=%s AND refnum=%i AND maxnum=%i",
+ WHERE number='%s' AND refnum=%i AND maxnum=%i",
data->remote.number,
data->udh.udh[0].u.concatenated_short_message.reference_number,
data->udh.udh[0].u.concatenated_short_message.maximum_number);
- quoting fix for smsd/mysql.c update multipartinbox,
Paulius Bulotas <=