[svn-commits] mjordan: trunk r392676 - /trunk/res/res_fax.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jun 23 14:19:32 CDT 2013


Author: mjordan
Date: Sun Jun 23 14:19:30 2013
New Revision: 392676

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392676
Log:
Properly pack the parameters into ast_json_pack when sending a send fax message

This patch properly packs the parameters into the send fax message so that it
actually work.

Missing a ',' between two string fields can be difficult to debug, particularly
when the actual packing succeeds. Interestingly enough, this didn't actually
crash until the JSON blob we deref'd and disposed of. Since that happened in
a different thread, it was pretty tough to track down.


Modified:
    trunk/res/res_fax.c

Modified: trunk/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_fax.c?view=diff&rev=392676&r1=392675&r2=392676
==============================================================================
--- trunk/res/res_fax.c (original)
+++ trunk/res/res_fax.c Sun Jun 23 14:19:30 2013
@@ -2308,9 +2308,8 @@
 		if (!ast_strlen_zero(fax_bitrate)) {
 			fax_bitrate = ast_strdupa(fax_bitrate);
 		}
-
 		json_obj = ast_json_pack("{s: s, s: s, s: s, s: s, s: s, s: s, s: o}",
-				"type", "send"
+				"type", "send",
 				"remote_station_id", S_OR(remote_station_id, ""),
 				"local_station_id", S_OR(local_station_id, ""),
 				"fax_pages", S_OR(fax_pages, ""),




More information about the svn-commits mailing list