変更機能sms_priority_compare
sms.c
中:
if (msg1->sms.time > msg2->sms.time)
ret = 1;
else if (msg1->sms.time < msg2->sms.time)
ret = -1;
smsc/smsc_smpp.c
の変更機能smpp_status_to_smscconn_failure_reason
if (msg1->sms.time > msg2->sms.time)
ret = -1;
else if (msg1->sms.time < msg2->sms.time)
ret = 1;
else {
if (msg1->sms.id > msg2->sms.id)
ret = -1;
else if (msg1->sms.id < msg2->sms.id)
ret = 1;
else
ret = 0;
}
- へ:
static long smpp_status_to_smscconn_failure_reason(long status)
{
switch(status) {
case SMPP_ESME_RMSGQFUL:
case SMPP_ESME_RTHROTTLED:
case SMPP_ESME_RX_T_APPN:
case SMPP_ESME_RSYSERR:
return SMSCCONN_FAILED_TEMPORARILY;
break;
default:
return SMSCCONN_FAILED_REJECTED;
}
}
static long smpp_status_to_smscconn_failure_reason(long status)
{
switch(status) {
case SMPP_ESME_RMSGQFUL:
case SMPP_ESME_RX_T_APPN:
case SMPP_ESME_RSYSERR:
return SMSCCONN_FAILED_TEMPORARILY;
break;
case SMPP_ESME_RTHROTTLED:
return SMPP_ESME_RTHROTTLED;
break;
default:
return SMSCCONN_FAILED_REJECTED;
}
}
に変更機能
smsc/smsc_smpp.c
で
handle_pdu
(
case submit_sm_resp:
):
if (pdu->u.submit_sm_resp.command_status == SMPP_ESME_RTHROTTLED)
time(&(smpp->throttling_err_time));
else
smpp->throttling_err_time = 0;
bb_smscconn_send_failed(smpp->conn, msg, reason, octstr_format("0x%08lx/%s", pdu->u.submit_sm_resp.command_status,
smpp_error_to_string(pdu->u.submit_sm_resp.command_status)));
if (pdu->u.submit_sm_resp.command_status == SMPP_ESME_RTHROTTLED)
time(&(smpp->throttling_err_time));
else
smpp->throttling_err_time = 0;
if (pdu->u.submit_sm_resp.command_status == SMPP_ESME_RMSGQFUL)
time(&msg->sms.time);
bb_smscconn_send_failed(smpp->conn, msg, reason, octstr_format("0x%08lx/%s", pdu->u.submit_sm_resp.command_status,
smpp_error_to_string(pdu->u.submit_sm_resp.command_status)));
に変更機能
bb_smscconn.c
で
bb_smscconn_send_failed
:
case SMSCCONN_FAILED_TEMPORARILY:
...
gwlist_produce(outgoing_sms, sms);
break;
case SMSCCONN_FAILED_SHUTDOWN:
gwlist_produce(outgoing_sms, sms);
break;
handle_split
bb_smscconn.c
の変更機能
case SMSCCONN_FAILED_TEMPORARILY:
...
gwlist_produce(outgoing_sms, sms);
break;
case SMPP_ESME_RTHROTTLED:
gwlist_insert(outgoing_sms, 0, sms);
break;
case SMSCCONN_FAILED_SHUTDOWN:
gwlist_produce(outgoing_sms, sms);
break;
- へ:
case SMSCCONN_FAILED_TEMPORARILY:
...
gwlist_produce(outgoing_sms, msg);
break;
case SMSCCONN_FAILED_DISCARDED:
case SMSCCONN_FAILED_TEMPORARILY:
...
gwlist_produce(outgoing_sms, msg);
break;
case SMPP_ESME_RTHROTTLED:
gwlist_insert(outgoing_sms, 0, msg);
break;
case SMSCCONN_FAILED_DISCARDED: