~ubuntu-branches/debian/sid/network-manager/sid

« back to all changes in this revision

Viewing changes to src/modem-manager/nm-modem-manager.c

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2011-11-03 21:32:50 UTC
  • mfrom: (1.4.6)
  • Revision ID: package-import@ubuntu.com-20111103213250-w49ucjmux3hbwnta
Tags: 0.9.1.95-1
* New upstream release (0.9.2 rc1).
  - Fix connection sharing with newer iptables versions. (Closes: #638995)
  - Fix handling of numeric SSIDs in the keyfile plugin. (Closes: #642912)
* debian/watch: Track .xz tarballs.
* debian/libnm-util2.symbols: Add new symbols for libnm-util.
* debian/patches/04-dont-update-routing-and-dns-for-unmanaged-devices.patch
  - Avoid blowing away existing routes and resolv.conf if NM never managed
    any devices. (Closes: #546893, #624159, #637005, #641904)
* debian/control: Add Build-Depends on libglib2.0-doc for proper
  cross-references in the gtk-doc API documentation.
* Enable default hardening options from dpkg-buildflags.
  - Use buildflags.mk snippet in debian/rules.
  - Add Build-Depends on dpkg-dev (>= 1.6.1).

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include "nm-dbus-manager.h"
30
30
#include "nm-modem-types.h"
31
31
#include "nm-marshal.h"
 
32
#include "nm-dbus-glib-types.h"
32
33
 
33
34
#define MODEM_POKE_INTERVAL 120
34
35
 
235
236
        }
236
237
}
237
238
 
 
239
static void
 
240
mm_poke_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
 
241
{
 
242
        GPtrArray *modems;
 
243
        int i;
 
244
 
 
245
        if (dbus_g_proxy_end_call (proxy, call, NULL,
 
246
                                   DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &modems,
 
247
                                   G_TYPE_INVALID)) {
 
248
                /* Don't care about the returned value, just free it */
 
249
                for (i = 0; i < modems->len; i++)
 
250
                        g_free ((char *) g_ptr_array_index (modems, i));
 
251
                g_ptr_array_free (modems, TRUE);
 
252
        }
 
253
        g_object_unref (proxy);
 
254
}
 
255
 
238
256
static gboolean
239
257
poke_modem_cb (gpointer user_data)
240
258
{
242
260
        NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
243
261
        DBusGConnection *g_connection;
244
262
        DBusGProxy *proxy;
 
263
        DBusGProxyCall *call;
245
264
 
246
265
        g_connection = nm_dbus_manager_get_connection (priv->dbus_mgr);
247
266
        proxy = dbus_g_proxy_new_for_name (g_connection,
249
268
                                                                           MM_DBUS_PATH,
250
269
                                                                           MM_DBUS_INTERFACE);
251
270
 
252
 
        dbus_g_proxy_call_no_reply (proxy, "EnumerateDevices", G_TYPE_INVALID);
253
 
        g_object_unref (proxy);
254
 
 
 
271
        call = dbus_g_proxy_begin_call_with_timeout (proxy,
 
272
                                                     "EnumerateDevices",
 
273
                                                     mm_poke_cb,
 
274
                                                     NULL,
 
275
                                                     NULL,
 
276
                                                     5000,
 
277
                                                     G_TYPE_INVALID);
255
278
        return TRUE;
256
279
}
257
280