mirror of
https://github.com/sailfishos/ofono
synced 2025-12-01 23:21:04 +08:00
Compare commits
6 Commits
mer/1.23+g
...
mer/1.23+g
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c0f5094a6 | ||
|
|
4208b6d9ea | ||
|
|
59e304d474 | ||
|
|
30a2424507 | ||
|
|
e4f3ec6322 | ||
|
|
95fd4efc37 |
@@ -960,6 +960,12 @@ static gboolean ril_data_call_setup_submit(struct ril_data_request *req)
|
||||
RADIO_TECH_LTE : priv->network->data.ril_tech;
|
||||
if (tech > 2) {
|
||||
tech += 2;
|
||||
} else {
|
||||
/*
|
||||
* This value used to be hardcoded, let's keep using it
|
||||
* as the default.
|
||||
*/
|
||||
tech = RADIO_TECH_HSPA;
|
||||
}
|
||||
|
||||
if (setup->username && setup->username[0]) {
|
||||
|
||||
@@ -405,18 +405,18 @@ static void sim_fs_op_read_block_cb(const struct ofono_error *error,
|
||||
}
|
||||
|
||||
start_block = op->offset / 256;
|
||||
end_block = (op->offset + (op->num_bytes - 1)) / 256;
|
||||
end_block = op->num_bytes ? (op->offset + op->num_bytes - 1) / 256 :
|
||||
start_block;
|
||||
|
||||
if (op->current == start_block) {
|
||||
bufoff = 0;
|
||||
dataoff = op->offset % 256;
|
||||
tocopy = MIN(256 - op->offset % 256,
|
||||
op->num_bytes - op->current * 256);
|
||||
tocopy = MIN(256 - dataoff, op->num_bytes);
|
||||
} else {
|
||||
bufoff = (op->current - start_block - 1) * 256 +
|
||||
bufoff = (op->current - start_block) * 256 -
|
||||
op->offset % 256;
|
||||
dataoff = 0;
|
||||
tocopy = MIN(256, op->num_bytes - op->current * 256);
|
||||
tocopy = MIN(256, op->num_bytes - bufoff);
|
||||
}
|
||||
|
||||
DBG("bufoff: %d, dataoff: %d, tocopy: %d",
|
||||
@@ -485,13 +485,12 @@ static gboolean sim_fs_op_read_block(gpointer user_data)
|
||||
bufoff = 0;
|
||||
seekoff = SIM_CACHE_HEADER_SIZE + op->current * 256 +
|
||||
op->offset % 256;
|
||||
toread = MIN(256 - op->offset % 256,
|
||||
op->num_bytes - op->current * 256);
|
||||
toread = MIN(256 - op->offset % 256, op->num_bytes);
|
||||
} else {
|
||||
bufoff = (op->current - start_block - 1) * 256 +
|
||||
bufoff = (op->current - start_block) * 256 -
|
||||
op->offset % 256;
|
||||
seekoff = SIM_CACHE_HEADER_SIZE + op->current * 256;
|
||||
toread = MIN(256, op->num_bytes - op->current * 256);
|
||||
toread = MIN(256, op->num_bytes - bufoff);
|
||||
}
|
||||
|
||||
DBG("bufoff: %d, seekoff: %d, toread: %d",
|
||||
|
||||
@@ -130,6 +130,9 @@ systemctl daemon-reload ||:
|
||||
%postun
|
||||
systemctl daemon-reload ||:
|
||||
|
||||
%transfiletriggerin -- %{_libdir}/ofono/plugins
|
||||
systemctl try-restart ofono.service ||:
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%license COPYING
|
||||
|
||||
Reference in New Issue
Block a user