aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
AgeCommit message (Collapse)Author
2013-03-05core: don't automatically probe ports of USB<->serial adaptersAleksander Morgado
We should not automatically probe ports marked as coming from USB to serial adapters, as we're not sure that a modem is behind the adapter. Still, let the user request a manual scan and have these devices probed in that case. https://bugzilla.gnome.org/show_bug.cgi?id=647556 https://bugzilla.gnome.org/show_bug.cgi?id=691076
2013-02-12core: use g_unix_signal_add() for more reliable Unix signal handlingDan Williams
There were a few problems with MM's existing signal handling, first of which was that calling g_main_loop_quit() from a signal handler only works 50% of the time due to severe restrictions on what you can do from the handler. This caused INT or TERM to sometimes be ignored by MM. Instead, use the glib signal functions which ensure that the handler is run in the right context, where we can do anything we want.
2012-10-09core: second request to terminate does a hard exit()Aleksander Morgado
2012-10-08core: log successful shutdownAleksander Morgado
2012-10-08core: don't wait forever to get all modems disabled and removedAleksander Morgado
Just in case, put a maximum time to wait for all modems to get disabled and removed, as we don't want to wait forever.
2012-09-28core: acquire DBus name only after having created the `MMManager'Aleksander Morgado
The `MMManager' is itself also a `GDBusObjectManagerServer'. If we create this object after having fully acquired the bus name, the client application in the other side of the bus could be trying to use the ObjectManager interface before we actually exported it, which is wrong. Therefore, we need to make sure that the Manager interfaces are all exported before the name is acquired.
2012-03-16log: only include LOC and method name in debug logs if running with --debugAleksander Morgado
If the modem is started with --log-level=DEBUG, they will not be shown.
2012-03-16context: new source files to keep the daemon contextAleksander Morgado
2012-03-15core: implement the Manager1 DBus interface, based on GDBusAleksander Morgado
The MMManager object now derives from the gdbus-codegen-generated MmGdbusOrgFreedesktopModemManager1Skeleton object, and implements the handlers for the SetLogging() and ScanDevices() DBus methods. The main program is also modified to be based on GDBus.
2011-01-23core: enable timestamps with legacy --debug optionDan Williams
2011-01-23core: rework loggingDan Williams
Make it more flexible, add logging to a file, and absolute and relative timestamps.
2010-08-11core: work around dbus-glib property access bug (CVE-2010-1172) (rh #585394)Dan Williams
More info: https://bugzilla.redhat.com/show_bug.cgi?id=585394 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1172 dbus-glib was not properly enforcing the 'access' permissions on object properties exported using its API. There were 2 specific bugs: 1) dbus-glib did not enforce the introspection read/write property permissions, so if the GObject property definition allowed write access (which is sometimes desirable), D-Bus clients could modify that value even if the introspection said it was read-only 2) dbus-glib was not filtering out GObject properties that were not listed in the introspection XML. Thus, if the GObject defined more properties than were listed in the introspection XML (which is also often useful, and MM uses this quite a bit) those properties would also be exposed to D-Bus clients. To fix this completely, you need to: 1) get dbus-glib master when the patch is commited, OR grab the patch from https://bugzilla.redhat.com/show_bug.cgi?id=585394 and build a new dbus-glib 2) rebuild ModemManager against the new dbus-glib
2010-05-21build: print version on startup and add dist-versionDan Williams
Distributions should set dist-version at build time with the package version and revision, so for RPM-based distros you'd --with-dist-version=%{version}-%{release} which will be printed out on MM startup to help debugging.
2010-03-22core: cleanly disable modems on shutdownDan Williams
2010-03-09core: fix SIGTERM before mainloop has startedDan Williams
2009-06-18core: gracefully handle SIGTERM and SIGINT by shutting down cleanlyDan Williams
2009-06-18udev: move device probing and detection to udevDan Williams
Get rid of dependency on HAL, using libgudev instead. Fix up the plugin API to no longer use either HAL or udev defines, but let plugins use whatever mechanism they want for getting more information out of the device given the subsystem and device node name. Modems are now defined as "master" devices which "own" a one or more ports. A port could be a serial tty device or a network device or whatever. The plugin figures out whether it supports a given port or not and then assigns it to a new or existing modem. Modems now have a 'valid' property that should be set to TRUE when the modem has enough ports to operate correctly. For devices (ex. 'hso') that use a network device for data transfer, the modem would need to grab at least one TTY and the network device associated with that physical device to be 'valid'. Also move the generic modem support code to a plugin like other modem plugins, and change the I-support-this-device mechanism to return a number indicating the level of support. For example, the generic plugin would return a quite low number if the device indicates via probing that it can do GSM or CDMA, but a more specific plugin can indicate better support for the device, and thus the more specific plugin would win control.
2009-04-14Handle cases where HAL is not running/disappears/reappears.Tambet Ingo
2009-02-10add --enable-more-warnings=yes/no and fix up resulting errorsDan Williams
2009-02-04Fix a typo in error message when MM couldn't acquire it's DBus service name.Tambet Ingo
2008-10-30Enable/disable debugging on SIGUSR1.Tambet Ingo
2008-09-11Rewrite serial device communications.Tambet Ingo
Instead of vague "send something, wait something" the responses are now analyzed by (overridable) parsers. Makes all the modem implementations much easier since each caller knows without any code whether the call succeeded or failed. Another thing that makes modem code simpler (and the whole thing more robust), is the queueing of sent commands. Each queued command has a command and a callback which is quaranteed to get called, even if sending failed. Define and implement error reporting.
2008-07-31Initial commit.Tambet Ingo