[asterisk-commits] may: branch may/smpp r403011 - /team/may/smpp/branches/10/addons/res_smpp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 22 09:32:11 CST 2013


Author: may
Date: Fri Nov 22 09:32:08 2013
New Revision: 403011

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403011
Log:
introduce registered_delivery smpp message parameters
(now we can send delivery reports)

Modified:
    team/may/smpp/branches/10/addons/res_smpp.c

Modified: team/may/smpp/branches/10/addons/res_smpp.c
URL: http://svnview.digium.com/svn/asterisk/team/may/smpp/branches/10/addons/res_smpp.c?view=diff&rev=403011&r1=403010&r2=403011
==============================================================================
--- team/may/smpp/branches/10/addons/res_smpp.c (original)
+++ team/may/smpp/branches/10/addons/res_smpp.c Fri Nov 22 09:32:08 2013
@@ -377,6 +377,8 @@
 #define FILL_MSG_HEADERS(msg, deliver, tmp) \
 		snprintf(tmp, sizeof(tmp), "%d", deliver->data_coding); \
 		ast_msg_set_var(msg, "dcs", tmp); \
+		snprintf(tmp, sizeof(tmp), "%d", deliver->registered_delivery); \
+		ast_msg_set_var(msg, "registered_delivery", tmp); \
 		snprintf(tmp, sizeof(tmp), "%s", deliver->service_type); \
 		ast_msg_set_var(msg, "service_type", tmp); \
 		snprintf(tmp, sizeof(tmp), "%d", deliver->esm_class); \
@@ -1246,7 +1248,6 @@
 			resp->delivered = 0;
 			ast_mutex_unlock(&resp->lock);
 			ast_cond_signal(&resp->cond);
-			ast_mutex_lock(&resp->lock);
 		}
 		AST_LIST_UNLOCK(&prev->respq);
 		AST_LIST_HEAD_DESTROY(&prev->respq);
@@ -1337,6 +1338,9 @@
 			(ast_msg_get_var(message, "service_type")) ? ast_msg_get_var(message, "service_type") : ""); \
 		if(ast_msg_get_var(message, "dcs")) { \
 			submit.data_coding = atoi(ast_msg_get_var(message, "dcs")); \
+		} \
+		if(ast_msg_get_var(message, "registered_delivery")) { \
+			submit.registered_delivery = atoi(ast_msg_get_var(message, "registered_delivery")); \
 		} \
 		if(ast_msg_get_var(message, "esm_class")) { \
 			submit.esm_class = atoi(ast_msg_get_var(message, "esm_class")); \




More information about the asterisk-commits mailing list