Hi Denis,

On 08/10/2019 06.08, Denis Kenzior wrote:
@@ -646,13 +653,6 @@ void g_at_mux_unref(GAtMux *mux)
      }
  }
-static void read_watcher_destroy_notify(gpointer user_data)
-{
-    GAtMux *mux = user_data;
-
-    mux->read_watch = 0;
-}
-
  gboolean g_at_mux_start(GAtMux *mux)
  {
      if (mux->channel == NULL)
@@ -666,8 +666,7 @@ gboolean g_at_mux_start(GAtMux *mux)
      mux->read_watch = g_io_add_watch_full(mux->channel, G_PRIORITY_DEFAULT,
                  G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL,
-                        received_data, mux,
-                        read_watcher_destroy_notify);
+                        received_data, mux, NULL);
      mux->shutdown = FALSE;


Can you tell me why this part is needed?  Does glib not call read_watcher_destroy_notify right away when the source is removed?

I sent is as a separate patch to show the details.

// Martin
_______________________________________________
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org

Reply via email to