pjsua multiline MESSAGE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 17 Jun 2013 20:24:05 +0200, Eeri Kask wrote:
>
>     im send_im sip:192.168.2.100  "A quick brown \
>     fox jumps over \
>     the lazy dog"


Attached is a temporary workaround to enable this feature, e.g. by giving

  im send_im sip:target  "A quick brown\nfox jumps over\nthe lazy dog"


The 'pj_scan_get_quotes()' is adjusted; its a dirty trick of least
effort, though. (The same function is used e.g. by the xml parser, so
this "solution" is most probably not correct, for this reason alone.)

Anyways, it is obviously advantageous to be able to send multiline, e.g.
base64 encoded binary messages by pjsua.  :-)

    Eeri Kask

-------------- next part --------------
--- pjlib-util/src/pjlib-util/scanner.c.orig	2013-06-19 19:22:15.000000000 +0200
+++ pjlib-util/src/pjlib-util/scanner.c	2013-06-19 20:00:33.000000000 +0200
@@ -376,6 +376,10 @@
     do {
 	/* loop until end_quote is found. */
 	while (PJ_SCAN_CHECK_EOF(s) && *s != '\n' && *s != end_quote[qpair]) {
+	    if (PJ_SCAN_CHECK_EOF(s+1) && *s == '\\' && *(s+1) == 'n') {
+		*s++ = '\r';
+		*s = '\n';
+	    }
 	    ++s;
 	}
 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux