mirror of git://git.sysmocom.de/ofono
30c742439d
The state needs to be checked prior to calling __ofono_atom_register because atom registration calls OFONO_ATOM_WATCH_CONDITION_REGISTERED callbacks each of which may call ofono_sim_inserted_notify. Should that happen, by the time __ofono_atom_register returns, ofono_sim will be in OFONO_SIM_STATE_INSERTED state and sim_initialize will be called twice if the initial state was OFONO_SIM_STATE_NOT_PRESENT. If nothing else, that results in memory leaks like this one (because IMSI will be queried twice, among other things): ==3017== 16 bytes in 1 blocks are definitely lost in loss record 187 of 475 ==3017== at 0x483F380: malloc (vg_replace_malloc.c:296) ==3017== by 0x4AFB0DF: g_malloc (gmem.c:94) ==3017== by 0x4B12185: g_strdup (gstrfuncs.c:363) ==3017== by 0xF79D3: sim_imsi_obtained (sim.c:1535) ==3017== by 0xF7BB3: sim_imsi_cb (sim.c:1594) ==3017== by 0x66C23: at_cimi_cb (sim.c:441) ==3017== by 0xA6B53: at_chat_finish_command (gatchat.c:459) ==3017== by 0xA6D9F: at_chat_handle_command_response (gatchat.c:521) ==3017== by 0xA70AF: have_line (gatchat.c:600) ==3017== by 0xA76DF: new_bytes (gatchat.c:759) ==3017== by 0xABACF: received_data (gatio.c:122) ==3017== by 0xAD093: watch_dispatch (gatmux.c:461) ==3017== by 0xAC5D3: dispatch_sources (gatmux.c:180) ==3017== by 0xAC98F: received_data (gatmux.c:265) ==3017== by 0x4AF606F: g_main_dispatch (gmain.c:3154) ==3017== by 0x4AF606F: g_main_context_dispatch (gmain.c:3769) ==3017== by 0x4AF631D: g_main_context_iterate.isra.4 (gmain.c:3840) ==3017== by 0x4AF658F: g_main_loop_run (gmain.c:4034) ==3017== by 0xBE8AF: main (main.c:261) |
||
---|---|---|
btio | ||
doc | ||
drivers | ||
dundee | ||
examples | ||
gatchat | ||
gdbus | ||
gisi | ||
gril | ||
include | ||
plugins | ||
src | ||
test | ||
tools | ||
unit | ||
.gitignore | ||
.mailmap | ||
AUTHORS | ||
COPYING | ||
ChangeLog | ||
HACKING | ||
INSTALL | ||
Makefile.am | ||
NEWS | ||
README | ||
TODO | ||
acinclude.m4 | ||
bootstrap | ||
bootstrap-configure | ||
configure.ac | ||
ofono.pc.in |
README
oFono - Open Source Telephony ***************************** Copyright (C) 2008-2011 Intel Corporation. All rights reserved. Compilation and installation ============================ In order to compile telephony stack you need following software packages: - GCC compiler - GLib library - D-Bus library To configure run: ./configure --prefix=/usr --mandir=/usr/share/man \ --sysconfdir=/etc --localstatedir=/var Configure automatically searches for all required components and packages. To compile and install run: make && make install Kernel Dependencies =================== In order to have the PPP stack working in oFono you need to enable CONFIG_TUN (Universal TUN/TAP device driver support) in your kernel .config. Information =========== Mailing list: ofono@ofono.org For additional information about the project visit oFono web site: http://www.ofono.org