[svn-commits] seanbright: trunk r198371 - in /trunk: ./ res/res_jabber.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat May 30 14:39:02 CDT 2009


Author: seanbright
Date: Sat May 30 14:38:58 2009
New Revision: 198371

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=198371
Log:
Merged revisions 198370 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r198370 | seanbright | 2009-05-30 15:36:20 -0400 (Sat, 30 May 2009) | 12 lines
  
  Properly terminate AMI JabberSend response messages.
  
  The response message (either Error or Success) needs an extra trailing \r\n
  after the fields to inform the client that the message is complete.
  
  (closes issue #14876)
  Reported by: srt
  Patches:
        05302009_1.4_res_jabber.c.diff uploaded by seanbright (license 71)
        asterisk_14876.patch uploaded by srt (license 378)
        trunk-14876-2.diff uploaded by phsultan (license 73)
........

Modified:
    trunk/   (props changed)
    trunk/res/res_jabber.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/res/res_jabber.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/res/res_jabber.c?view=diff&rev=198371&r1=198370&r2=198371
==============================================================================
--- trunk/res/res_jabber.c (original)
+++ trunk/res/res_jabber.c Sat May 30 14:38:58 2009
@@ -3009,17 +3009,17 @@
 	if (!client) {
 		astman_send_error(s, m, "Could not find Sender");
 		return 0;
-	}	
-	if (strchr(screenname, '@') && message){
-		ast_aji_send_chat(client, screenname, message);	
+	}
+	if (strchr(screenname, '@') && message) {
+		ast_aji_send_chat(client, screenname, message);
 		astman_append(s, "Response: Success\r\n");
-		if (!ast_strlen_zero(id))
-			astman_append(s, "ActionID: %s\r\n",id);
-		return 0;
-	}
-	astman_append(s, "Response: Error\r\n");
-	if (!ast_strlen_zero(id))
+	} else {
+		astman_append(s, "Response: Error\r\n");
+	}
+	if (!ast_strlen_zero(id)) {
 		astman_append(s, "ActionID: %s\r\n",id);
+	}
+	astman_append(s, "\r\n");
 	return 0;
 }
 




More information about the svn-commits mailing list