[asterisk-commits] seanbright: branch 1.4 r198370 - /branches/1.4/res/res_jabber.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat May 30 14:36:33 CDT 2009
Author: seanbright
Date: Sat May 30 14:36:20 2009
New Revision: 198370
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=198370
Log:
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:
branches/1.4/res/res_jabber.c
Modified: branches/1.4/res/res_jabber.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/res/res_jabber.c?view=diff&rev=198370&r1=198369&r2=198370
==============================================================================
--- branches/1.4/res/res_jabber.c (original)
+++ branches/1.4/res/res_jabber.c Sat May 30 14:36:20 2009
@@ -2423,16 +2423,16 @@
astman_send_error(s, m, "Could not find Sender");
return 0;
}
- if (strchr(screenname, '@') && message){
- ast_aji_send(client, screenname, message);
- if (!ast_strlen_zero(id))
- astman_append(s, "ActionID: %s\r\n",id);
+ if (strchr(screenname, '@') && message) {
+ ast_aji_send(client, screenname, message);
astman_append(s, "Response: Success\r\n");
- return 0;
- }
- if (!ast_strlen_zero(id))
- astman_append(s, "ActionID: %s\r\n",id);
- astman_append(s, "Response: Failure\r\n");
+ } else {
+ astman_append(s, "Response: Failure\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 asterisk-commits
mailing list