Patch: XML Post and dlr-url

"Nikos Balkanas" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <485CB105ADB742C3A23AB6C4704D532A@drwho>
Hi,

This is a simple patch fixing an XML parsing issue in smsbox. 

Reported by Oscar Cassetti.

@Oscar: Please test patch, I don't have an XML file handy.

BR,
Nikos
smsbox.diff (application/octet-stream, 750 B)
Index: gw/smsbox.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsbox.c,v
retrieving revision 1.284
diff -a -u -r1.284 smsbox.c
--- gw/smsbox.c	6 Dec 2009 17:24:14 -0000	1.284
+++ gw/smsbox.c	27 Feb 2010 11:43:54 -0000
@@ -805,8 +805,16 @@
 		*dlr_mask = tmplong;
 	    O_DESTROY(tmp2);
 	}
-	get_tag(tmp, octstr_imm("dlr-url"), dlr_url, 0, 0);
-	O_DESTROY(tmp);
+   if (get_tag(tmp, octstr_imm("dlr-url"), dlr_url, 0, 0) > 0)
+   {
+      Octstr *token = octstr_create("&amp;");
+      Octstr *repl = octstr_create("&");
+
+      octstr_replace(*dlr_url, token, repl);
+      octstr_destroy(token);
+      octstr_destroy(repl);
+   }
+   O_DESTROY(tmp);
     }
 
     /* validity (vp/delay) */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.