[pkg-fso-commits] [SCM] GSM user space multiplexer branch, master, updated. 0.9.2.2-9-gabcbcd7
Michael 'Mickey' Lauer
mickey at vanille-media.de
Tue Jan 27 18:36:30 UTC 2009
The following commit has been merged in the master branch:
commit b22cb80b6d6eff0c962441bb81552d09d4c66907
Author: Michael 'Mickey' Lauer <mickey at vanille-media.de>
Date: Wed Jan 21 15:46:10 2009 +0100
send org.freesmartphone.GSM.MUX.NoChannel, if AllocChannel fails
diff --git a/ChangeLog b/ChangeLog
index 39df86c..6815a4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-01-21 Michael Lauer <mlauer at vanille-media.de>
+
+ * Send org.freesmartphone.MUX.NoChannel, if we AllocChannel fails
+ * Bring back closing the device after mainloop quits
+ * Release as 0.9.3
+
+2009-01-21 Paul Fertser <fercerpav at gmail.com>
+
+ * 0001-Implement-proper-channel-allocation-and-dealloction.patch
+
2009-01-10 Michael Lauer <mlauer at vanille-media.de>
* Release as 0.9.2.2
diff --git a/src/muxercontrol.c b/src/muxercontrol.c
index 9e8400f..b0b6289 100644
--- a/src/muxercontrol.c
+++ b/src/muxercontrol.c
@@ -10,6 +10,39 @@
+enum {
+ MUXER_ALLOC_ERROR
+} MuxerError;
+
+#define MUXER_ERROR ( muxer_error_quark() )
+#define MUXER_ERROR_TYPE ( muxer_error_get_type() )
+
+#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
+
+static GQuark muxer_error_quark(void)
+{
+ static GQuark quark = 0;
+ if (!quark)
+ quark = g_quark_from_static_string("muxer");
+
+ return quark;
+}
+
+static GType muxer_error_get_type(void)
+{
+ static GType etype = 0;
+ if (etype == 0) {
+ static const GEnumValue values[] = {
+ ENUM_ENTRY(MUXER_ALLOC_ERROR, "NoChannel"),
+ { 0, 0, 0 }
+ };
+
+ etype = g_enum_register_static("muxer", values);
+ }
+
+return etype;
+}
+
enum {
MUXER_CONTROL_DUMMY_PROPERTY
@@ -59,11 +92,12 @@ gboolean muxer_control_alloc_channel (MuxerControl* self, const char* origin, co
g_return_val_if_fail (channel != NULL, FALSE);
gboolean success = c_alloc_channel (origin, channel);
if (!success)
- g_set_error( error, DBUS_GERROR, 0xdeadbeef, "org.freesmartphone.GSM.MUX.NoChannel", "All channels are used" );
+ g_set_error( error, MUXER_ERROR, MUXER_ALLOC_ERROR, "All channels are used" );
return success;
}
MuxerControl* muxer_control_gen (void) {
+ dbus_g_error_domain_register(MUXER_ERROR, "org.freesmartphone.GSM.MUX", MUXER_ERROR_TYPE);
return muxer_control_new ();
}
--
GSM user space multiplexer
More information about the pkg-fso-commits
mailing list