~morphis/phablet-extras/ofono-sms-status-report

« back to all changes in this revision

Viewing changes to gatchat/gatio.c

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2012-08-22 19:59:08 UTC
  • mfrom: (1.3.3) (6.1.5 experimental)
  • Revision ID: package-import@ubuntu.com-20120822195908-0bmmk1hlh989bgk6
Tags: 1.9-1ubuntu1
* Merge with Debian experimental; remaining changes:
  - debian/control: explicitly Conflicts with modemmanager: having both
    installed / running at the same time causes issues causes issues with
    both claiming modem devices.
  - debian/patches/02-dont-handle-stacktraces.patch: stop catching stacktraces
    and printing the information internally, so apport can catch and report
    the possible bugs.
  - debian/ofono.postinst: on configure, notify the user that a reboot is
    required (so ofono can get started by upstart). (LP: #600501)
  - debian/rules: pass --no-restart-on-upgrade so ofono isn't automatically
    restarted when upgrades.
  - Adding upstart config / Removing standard init script
  - Adding Apport support
  - Patch for recognizing special Huawei devices with weird serial
  - Override lintian to avoid script-in-etc-init.d... warnings.
  - Update debian/compat to 7
* debian/series: add our patches to debian/patches/series now that the package
  uses quilt.
* debian/patches/02-dont-handle-stacktraces.patch: refreshed.
* debian/ofono-dev.install, debian/ofono.install:
  - Install usr/sbin/dundee and ofono.pc to the proper packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *
3
3
 *  AT chat library with GLib integration
4
4
 *
5
 
 *  Copyright (C) 2008-2010  Intel Corporation. All rights reserved.
 
5
 *  Copyright (C) 2008-2011  Intel Corporation. All rights reserved.
6
6
 *
7
7
 *  This program is free software; you can redistribute it and/or modify
8
8
 *  it under the terms of the GNU General Public License version 2 as
52
52
        gpointer write_data;                    /* Write callback userdata */
53
53
        GAtDebugFunc debugf;                    /* debugging output function */
54
54
        gpointer debug_data;                    /* Data to pass to debug func */
 
55
        GAtDisconnectFunc write_done_func;      /* tx empty notifier */
 
56
        gpointer write_done_data;               /* tx empty data */
55
57
        gboolean destroyed;                     /* Re-entrancy guard */
56
58
};
57
59
 
158
160
        io->write_watch = 0;
159
161
        io->write_handler = NULL;
160
162
        io->write_data = NULL;
 
163
 
 
164
        if (io->write_done_func) {
 
165
                io->write_done_func(io->write_done_data);
 
166
                io->write_done_func = NULL;
 
167
                io->write_done_data = NULL;
 
168
        }
161
169
}
162
170
 
163
171
static gboolean can_write_data(GIOChannel *channel, GIOCondition cond,
172
180
                return FALSE;
173
181
 
174
182
        return io->write_handler(io->write_data);
175
 
 
176
183
}
177
184
 
178
185
static GAtIO *create_io(GIOChannel *channel, GIOFlags flags)
370
377
 
371
378
        return TRUE;
372
379
}
 
380
 
 
381
void g_at_io_set_write_done(GAtIO *io, GAtDisconnectFunc func,
 
382
                                gpointer user_data)
 
383
{
 
384
        if (io == NULL)
 
385
                return;
 
386
 
 
387
        io->write_done_func = func;
 
388
        io->write_done_data = user_data;
 
389
}
 
390
 
 
391
void g_at_io_drain_ring_buffer(GAtIO *io, guint len)
 
392
{
 
393
        ring_buffer_drain(io->buf, len);
 
394
}