[PATCH] Fix aliases in smsbox
"Vincent CHAVANIS" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <03dd01c6e30e$19edcce0$9600a8c0@vince> |
It fixes aliases in smsbox. I don't understand why list should be destroy after executing the function find_translation() It fixes the segfault when smsbox is exiting. (seem happens in free variables process) Thanks uhuru for reporting this and provide a patch. Please comment/vote regards Vincent. -- Telemaque - 06200 NICE - (FR) Service Technique/Reseau - NOC Developpement SMS/MMS/Kiosques http://www.telemaque.fr/ [email protected] Tel : +33 4 93 97 71 64 (fax 68)
urltrans.txt
(text/plain, 809 B)
diff -rau /gateway-cvs/gw/urltrans.c /gateway/gw/urltrans.c
--- /gateway-cvs/gw/urltrans.c 2006-04-24 23:42:56.000000000 +0200
+++ /gateway/gw/urltrans.c 2006-09-28 16:48:39.000000000 +0200
@@ -1381,6 +1381,13 @@
octstr_convert_range(keyword, 0, octstr_len(keyword), tolower);
list = get_matching_translations(trans, keyword);
+
+ /*
+ if list is empty we will check into trans->dict (Dict of lowercase Octstr keywords)
+ */
+ if (gwlist_len(list) == 0)
+ list = dict_get(trans->dict, keyword);
+
/*
list now contains all translations where the keyword of the sms matches the
pattern defined by the tranlsation's keyword
@@ -1401,7 +1408,6 @@
*reject = 0;
octstr_destroy(keyword);
- gwlist_destroy(list, NULL);
return t;
}