FreeCalypso > hg > fc-magnetite
comparison src/aci2/aci/cmh_smsr.c @ 479:e9e72ec7b318
aci2: Openmoko's SMS memory full bogon removed
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 14 Jun 2018 07:43:01 +0000 |
parents | 93999a60b835 |
children |
comparison
equal
deleted
inserted
replaced
478:5e39123540e6 | 479:e9e72ec7b318 |
---|---|
1020 | 1020 |
1021 TRACE_FUNCTION ("cmhSMS_SMSErrorInd()"); | 1021 TRACE_FUNCTION ("cmhSMS_SMSErrorInd()"); |
1022 | 1022 |
1023 TRACE_EVENT_P1("MNSMS_ERROR_IND: 0x%4.4X", (int)mnsms_error_ind->cause); | 1023 TRACE_EVENT_P1("MNSMS_ERROR_IND: 0x%4.4X", (int)mnsms_error_ind->cause); |
1024 | 1024 |
1025 /* send CMS error code for SMS memory full */ | 1025 /* |
1026 * The following piece of code has been added by Openmoko and then | |
1027 * subsequently removed in FC Magnetite once I saw what it really does. | |
1028 * Apparently OM were too incompetent to figure out how to use the | |
1029 * existing SMS memory full/available notification mechanism by way | |
1030 * of AT+CMER configuration and +CIEV unsolicited responses, and | |
1031 * instead they added the following hack that sends a +CMS ERROR | |
1032 * response (always with a numeric code, even if AT+CMEE is set to 2) | |
1033 * as an unsolicited notification response on the memory full event. | |
1034 * | |
1035 * This code is bogus because it sends the unsolicited response string | |
1036 * out by calling io_sendMessage() with a hard-coded source ID (!), | |
1037 * and then adds to the bogosity by calling rCI_PlusCMS() in a context | |
1038 * in which it does not expect to be called, causing further breakage | |
1039 * in there. | |
1040 */ | |
1041 | |
1042 #if 0 | |
1026 if(mnsms_error_ind->cause == SMS_CAUSE_MEM_FULL) | 1043 if(mnsms_error_ind->cause == SMS_CAUSE_MEM_FULL) |
1027 { | 1044 { |
1028 char *sa; | 1045 char *sa; |
1029 ACI_MALLOC(sa,KEY + BYTE_LTH); | 1046 ACI_MALLOC(sa,KEY + BYTE_LTH); |
1030 sprintf(sa,"+CMS ERROR: %d",CMS_ERR_MemFull); | 1047 sprintf(sa,"+CMS ERROR: %d",CMS_ERR_MemFull); |
1031 io_sendMessage(3, sa, ATI_NORMAL_OUTPUT); | 1048 io_sendMessage(3, sa, ATI_NORMAL_OUTPUT); |
1032 ACI_MFREE(sa); | 1049 ACI_MFREE(sa); |
1033 rCI_PlusCMS ( 0, CMS_ERR_MemFull, NULL ); | 1050 rCI_PlusCMS ( 0, CMS_ERR_MemFull, NULL ); |
1034 } | 1051 } |
1052 #endif | |
1035 | 1053 |
1036 if( (mnsms_error_ind->cause != SMS_CAUSE_MEM_FULL) && | 1054 if( (mnsms_error_ind->cause != SMS_CAUSE_MEM_FULL) && |
1037 (mnsms_error_ind->cause != SMS_CAUSE_MEM_AVAIL) ) | 1055 (mnsms_error_ind->cause != SMS_CAUSE_MEM_AVAIL) ) |
1038 { | 1056 { |
1039 smsShrdPrm.cnma_ack_expected = FALSE; | 1057 smsShrdPrm.cnma_ack_expected = FALSE; |