Commit 7768e7cf authored by Slava Monich's avatar Slava Monich

Merge pull request #33 from monich/retrieve-timeout

Limit receive task timeout by 10 minutes
parents 3c82ecf9 a5add7e0
......@@ -307,9 +307,6 @@ mms_task_notification_new(
config, handler, "Notification", NULL, imsi);
ind->push = g_bytes_ref(bytes);
ind->pdu = pdu;
if (pdu->type == MMS_MESSAGE_TYPE_NOTIFICATION_IND) {
ind->task.deadline = pdu->ni.expiry;
}
return &ind->task;
} else {
MMS_ERROR(error, MMS_LIB_ERROR_DECODE, "Failed to decode MMS PDU");
......
......@@ -129,7 +129,9 @@ mms_task_retrieve_new(
MMSTaskRetrieve* retrieve = mms_task_http_alloc(
MMS_TYPE_TASK_RETRIEVE, config, handler, "Retrieve", id, imsi,
pdu->ni.location, MMS_RETRIEVE_CONF_FILE, NULL);
retrieve->http.task.deadline = pdu->ni.expiry;
if (retrieve->http.task.deadline > pdu->ni.expiry) {
retrieve->http.task.deadline = pdu->ni.expiry;
}
retrieve->transaction_id = g_strdup(pdu->transaction_id);
return &retrieve->http.task;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment