[asterisk-commits] file: branch 1.2 r47549 - /branches/1.2/apps/app_sms.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Nov 13 10:05:32 MST 2006


Author: file
Date: Mon Nov 13 11:05:32 2006
New Revision: 47549

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47549
Log:
When sending an SMS with a user data header properly set the UDH flag in the first byte. (issue #8347 reported by hoffmeis)

Modified:
    branches/1.2/apps/app_sms.c

Modified: branches/1.2/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_sms.c?view=diff&rev=47549&r1=47548&r2=47549
==============================================================================
--- branches/1.2/apps/app_sms.c (original)
+++ branches/1.2/apps/app_sms.c Mon Nov 13 11:05:32 2006
@@ -1050,7 +1050,7 @@
 		unsigned char p = 2;
 		h->omsg[0] = 0x91;		  /* SMS_DATA */
 		if (h->smsc) {			 /* deliver */
-			h->omsg[p++] = (more ? 4 : 0);
+			h->omsg[p++] = (more ? 4 : 0) + ((h->udhl > 0) ? 0x40 : 0);
 			p += packaddress (h->omsg + p, h->oa);
 			h->omsg[p++] = h->pid;
 			h->omsg[p++] = h->dcs;



More information about the asterisk-commits mailing list