1. 03 Aug, 2017 1 commit
    • Philip Withnall's avatar
      Consistently save errno immediately after the operation setting it · 5cddde1f
      Philip Withnall authored
      Prevent the situation where errno is set by function A, then function B
      is called (which is typically _(), but could be anything else) and it
      overwrites errno, then errno is checked by the caller.
      
      errno is a horrific API, and we need to be careful to save its value as
      soon as a function call (which might set it) returns. i.e. Follow the
      pattern:
        int errsv, ret;
        ret = some_call_which_might_set_errno ();
        errsv = errno;
      
        if (ret < 0)
          puts (strerror (errsv));
      
      This patch implements that pattern throughout GLib. There might be a few
      places in the test code which still use errno directly. They should be
      ported as necessary. It doesn’t modify all the call sites like this:
        if (some_call_which_might_set_errno () && errno == ESOMETHING)
      since the refactoring involved is probably more harmful than beneficial
      there. It does, however, refactor other call sites regardless of whether
      they were originally buggy.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=785577
      5cddde1f
  2. 21 Jun, 2017 1 commit
  3. 29 May, 2017 1 commit
  4. 22 Nov, 2016 1 commit
  5. 29 Jun, 2016 1 commit
  6. 05 Feb, 2015 1 commit
  7. 09 Feb, 2014 1 commit
    • Matthias Clasen's avatar
      Docs: Drop entities, switch away from sgml mode · 35066ed6
      Matthias Clasen authored
      Since all element markup is now gone from the doc comments,
      we can turn off the gtk-doc sgml mode, which means that from
      now on, docbook markup is no longer allowed in doc comments.
      
      To make this possible, we have to replace all remaining
      entities in doc comments by their replacement text, &amp; -> &
      and so on.
      35066ed6
  8. 06 Feb, 2014 2 commits
  9. 24 May, 2013 1 commit
  10. 12 Dec, 2012 2 commits
    • Dan Winship's avatar
      gsocket: add getsockopt/setsockopt wrappers · 211ed177
      Dan Winship authored
      Add g_socket_get_option() and g_socket_set_option(), wrapping
      getsockopt/setsockopt for the case of integer-valued options. Update
      code to use these instead of the underlying calls.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=623187
      211ed177
    • Dan Winship's avatar
      Add gnetworking.h · b377e696
      Dan Winship authored
      Install a public "gnetworking.h" header that can be used to include
      the relevant OS-dependent networking headers. This does not really
      abstract away unix-vs-windows however; error codes, in particular,
      are incompatible.
      
      gnetworkingprivate.h now contains just a few internal URI-related
      functions
      
      Also add a g_networking_init() function to gnetworking.h, which can be
      used to explicitly initialize OS-level networking, rather than having
      that happen as a side-effect of registering GInetAddress.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=623187
      b377e696
  11. 10 Oct, 2012 1 commit
  12. 15 May, 2012 1 commit
  13. 12 Apr, 2012 1 commit
    • Alexander Larsson's avatar
      Fall back to SO_PEERCRED if credentials passing fails · 386f0f29
      Alexander Larsson authored
      Turns out libdbus doesn't send struct ucred credentials on linux, but
      just relies on the SO_PEERCRED support. However, gdbus does send, and
      expect to recieve a ucred credential. So, when libdbus talks to a
      gdbus server the authentication fails to send the credentials.
      
      We fix this by falling back to g_socket_get_credentials() if we don't
      get any credential messages.
      386f0f29
  14. 18 Jan, 2012 1 commit
  15. 27 May, 2011 1 commit
  16. 20 Apr, 2011 1 commit
  17. 08 Apr, 2011 1 commit
  18. 01 Feb, 2011 1 commit
  19. 29 Dec, 2010 1 commit
  20. 24 Sep, 2010 1 commit
  21. 09 Sep, 2010 1 commit
    • David Zeuthen's avatar
      GUnixConnection: Remove comment about Linux · a51df8ce
      David Zeuthen authored
      Since the previous commit, the g_unix_connection_send_credentials() /
      g_unix_connection_receive_credentials() functions now also works on
      FreeBSD since GUnixCredentialsMessage now works there.
      
      The main idea is that the g_unix_connection_send_credentials() /
      g_unix_connection_receive_credentials() functions are the "main" API
      for getting credentials (one way or the other). So it's better to
      avoid advertising where it is currently implemented.
      Signed-off-by: 's avatarDavid Zeuthen <davidz@redhat.com>
      a51df8ce
  22. 20 Jul, 2010 1 commit
    • David Zeuthen's avatar
      Bug 617483 – Credentials passing · 7eba4134
      David Zeuthen authored
       - Make GCredentials instance and class structures private so it can't
         be subclassed and we don't have to worry about ABI compat
         issues. This also allows us to get rid of the GCredentialsPrivate
         struct.
      
       - Add a GCredentialsType enumeration that is used whenever exchanging
         pointers with the user. This allows us to support OSes with
         multiple native credential types. In particular, it allows
         supporting OSes where the native credential evolves or even changes
         over time.
      
       - Add g_socket_get_credentials() method.
      
       - Add tests for g_socket_get_credentials(). Right now this is in the
         GDBus peer-to-peer test case but we can change that later.
      
       - Move GTcpConnection into a separate gtk-doc page as was already
         half-done with GUnixConnection. Also finish the GUnixConnection
         move and ensure send_credentials() and receive_credentials()
         methods are in the docs. Also nuke comment about GTcpConnection
         being empty compared to its superclass.
      Signed-off-by: 's avatarDavid Zeuthen <davidz@redhat.com>
      7eba4134
  23. 12 Jul, 2010 1 commit
  24. 07 Jul, 2010 1 commit
  25. 17 Jun, 2010 1 commit
  26. 14 May, 2010 1 commit
  27. 13 May, 2010 1 commit
  28. 09 May, 2010 1 commit
  29. 06 May, 2010 1 commit
  30. 30 Jun, 2009 1 commit
    • Dan Winship's avatar
      Add GCancellables to GSocket ops · 53beca95
      Dan Winship authored
      Currently, to implement cancellability correctly, all synchronous
      calls to GSocket must be preceded by a g_socket_condition_wait() call,
      (even though GSocket does this internally as well) and all
      asynchronous calls must do occasional manual
      g_cancellable_is_cancelled() checks. Since it's trivial to do these
      checks inside GSocket instead, and we don't particularly want to
      encourage people to use the APIs non-cancellably, move the
      cancellation support into GSocket and simplify the existing callers.
      
      http://bugzilla.gnome.org/show_bug.cgi?id=586797
      53beca95
  31. 27 May, 2009 1 commit
  32. 20 May, 2009 2 commits
    • Christian Persch's avatar
      Use g_set_error_literal · 80cfd099
      Christian Persch authored
      Bug #583206.
      80cfd099
    • Alexander Larsson's avatar
      Remove protocol names, instead use an enum with common protocols · 5cd86fbd
      Alexander Larsson authored
      The whole protocol name thing is pretty weird. The getprotobyname functions
      seem to only specify one mapping for name <-> ids, so all families/types
      must use the same values. Plus the values used for the protocols are
      standardized by IANA, so are always the same.
      
      So, we drop using names for protocols, intead introducing an enum with
      a few commonly availible and used protocols.
      5cd86fbd
  33. 18 May, 2009 1 commit
  34. 15 May, 2009 1 commit