1. 12 7月, 2011 2 次提交
  2. 09 7月, 2011 1 次提交
  3. 08 7月, 2011 3 次提交
    • D
      Don't exit if the libvirtd config does not exist · 8e2e4780
      Daniel P. Berrange 提交于
      It is common for the $HOME/.libvirt/libvirtd.conf file to not
      exist. Treat this situation as non-fatal since we can carry
      on with our default settings just fine.
      
      * daemon/libvirtd.c: Treat ENOENT as non-fatal when loading
        config
      8e2e4780
    • D
      Fix sending of reply to final RPC message · 3cfdc57b
      Daniel P. Berrange 提交于
      The dispatch for the CLOSE RPC call was invoking the method
      virNetServerClientClose(). This caused the client connection
      to be immediately terminated. This meant the reply to the
      final RPC message was never sent. Prior to the RPC rewrite
      we merely flagged the connection for closing, and actually
      closed it when the next RPC call dispatch had completed.
      
      * daemon/remote.c: Flag connection for a delayed close
      * daemon/stream.c: Update to use new API for closing
        failed connection
      * src/rpc/virnetserverclient.c, src/rpc/virnetserverclient.h:
        Add support for a delayed connection close. Rename the
        virNetServerClientMarkClose method to virNetServerClientImmediateClose
        to clarify its semantics
      3cfdc57b
    • D
      Fix potential crash in libvirtd with active streams · 3e5d48ef
      Daniel P. Berrange 提交于
      If a client disconnects while it has a stream active, there is
      a race condition which could see libvirtd crash. This is because
      the client struct may be freed before the last stream event has
      triggered. This is trivially solved by holding an extra reference
      on the client for the stream callbak
      
      * daemon/stream.c: Acquire reference on client when adding the
        stream callback
      3e5d48ef
  4. 06 7月, 2011 1 次提交
  5. 02 7月, 2011 1 次提交
  6. 01 7月, 2011 4 次提交
    • D
      Add conditionals to allow build without SASL · 0e4b921a
      Daniel P. Berrange 提交于
      * daemon/libvirtd.c, daemon/remote.c: Add #if HAVE_SASL and
        suitable function stubs to allow build without SASL
      0e4b921a
    • D
      Fix release of virNetMessagePtr instances in streams processing · c69ba670
      Daniel P. Berrange 提交于
      If a message packet for a invalid stream is received it is just
      free'd. This is not good because it doesn't let the client RPC
      request counter decrement. If a stream is shutdown with pending
      packets the message also isn't released properly because of an
      incorrect header type
      
      * daemon/stream.c: Fix message header type
      * src/rpc/virnetserverprogram.c: Send dummy reply instead of
        free'ing ignored stream message
      c69ba670
    • D
      Fix release of filtered stream messages · df65adf1
      Daniel P. Berrange 提交于
      The stream code was reusing a stream message object before
      it was removed from the linked list of filtered messages.
      This caused any later queued messages to be completely lost.
      
      * daemon/stream.c: Delay reuse of stream message until
        after it is removed from the queue
      df65adf1
    • D
      Fix hardcoded limit on client requests in RPC code · 27111b35
      Daniel P. Berrange 提交于
      The virNetServerClient object had a hardcoded limit of 10 requests
      per client. Extend constructor to allow it to be passed in as a
      configurable variable. Wire this up to the 'max_client_requests'
      config parameter in libvirtd
      
      * daemon/libvirtd.c: Pass max_client_requests into services
      * src/rpc/virnetserverservice.c, src/rpc/virnetserverservice.h: Pass
        nrequests_client_max to clients
      * src/rpc/virnetserverclient.c, src/rpc/virnetserverclient.h: Allow
        configurable request limit
      27111b35
  7. 29 6月, 2011 4 次提交
    • M
      Fix compilation with systemtap 1.3 · c565b67a
      Matthias Bolte 提交于
      Version 1.3 of <sys/sdt.h> uses this macro
      
        #define STAP_CAST(t) (size_t)t
      
      that breaks like this if t is a function
      
        remote.c:1775: error: cast from function call of type 'const char *'
        to non-matching type 'long unsigned int' [-Wbad-function-cast]
      
      For that to work it should probably look like this
      
        #define STAP_CAST(t) ((size_t)(t))
      
      In systemtap 1.4 this was completely rewritten.
      
      Anyway, before commit df0b57a9 t was always a variable, but now
      also a function is used here, namely virNetSASLSessionGetIdentity.
      
      Use an intermediate variable to avoid this problem.
      c565b67a
    • J
      daemon: Fix build without polkit · 26dbed15
      Jiri Denemark 提交于
      26dbed15
    • D
      Remove obsolete libvirtd mdns code · ea9694b2
      Daniel P. Berrange 提交于
      libvirtd now uses the generic RPC code for MDNS, so its
      custom mdns APIs are no longer required
      
      * daemon/mdns.c, daemon/mdns.h: Removed obsolete files
      ea9694b2
    • D
      Convert libvirtd over to the new RPC handling APIs · df0b57a9
      Daniel P. Berrange 提交于
      This guts the libvirtd daemon, removing all its networking and
      RPC handling code. Instead it calls out to the new virServerPtr
      APIs for all its RPC & networking work
      
      As a fallout all libvirtd daemon error reporting now takes place
      via the normal internal error reporting APIs. There is no need
      to call separate error reporting APIs in RPC code, nor should
      code use VIR_WARN/VIR_ERROR for reporting fatal problems anymore.
      
      * daemon/qemu_dispatch_*.h, daemon/remote_dispatch_*.h: Remove
        old generated dispatcher code
      * daemon/qemu_dispatch.h, daemon/remote_dispatch.h: New dispatch
        code
      * daemon/dispatch.c, daemon/dispatch.h: Remove obsoleted code
      * daemon/remote.c, daemon/remote.h: Rewrite for new dispatch
        APIs
      * daemon/libvirtd.c, daemon/libvirtd.h: Remove all networking
        code
      * daemon/stream.c, daemon/stream.h: Update for new APIs
      * daemon/Makefile.am: Link to libvirt-net-rpc-server.la
      df0b57a9
  8. 28 6月, 2011 1 次提交
  9. 27 6月, 2011 1 次提交
    • E
      build: rename Vcpupin to VcpuPin · 28e45afc
      Eric Blake 提交于
      We already have a public virDomainPinVcpu, which implies that
      Pin and Vcpu are treated as separate words.  Unreleased commit
      e261987c introduced virDomainGetVcpupinInfo as the first public
      API that used Vcpupin, although we had prior internal uses of
      that spelling.  For consistency, change the spelling to be two
      words everywhere, regardless of whether pin comes first or last.
      
      * daemon/remote.c: Treat vcpu and pin as separate words.
      * include/libvirt/libvirt.h.in: Likewise.
      * src/conf/domain_conf.c: Likewise.
      * src/conf/domain_conf.h: Likewise.
      * src/driver.h: Likewise.
      * src/libvirt.c: Likewise.
      * src/libvirt_private.syms: Likewise.
      * src/libvirt_public.syms: Likewise.
      * src/libxl/libxl_driver.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * tools/virsh.c: Likewise.
      * src/remote/remote_protocol.x: Likewise.
      * src/remote_protocol-structs: Likewise.
      Suggested by Matthias Bolte.
      28e45afc
  10. 25 6月, 2011 2 次提交
  11. 24 6月, 2011 3 次提交
  12. 21 6月, 2011 1 次提交
    • C
      Promote virEvent*Handle/Timeout to public API · 6094ad7b
      Cole Robinson 提交于
      Since we virEventRegisterDefaultImpl is now a public API, callers need
      a way to invoke the default registered Handle and Timeout functions. We
      already have general functions for these internally, so promote
      them to the public API.
      
      v2:
          Actually add APIs to libvirt.h
      6094ad7b
  13. 20 6月, 2011 3 次提交
  14. 16 6月, 2011 1 次提交
    • E
      sendkey: use consistent API convention · 1d575629
      Eric Blake 提交于
      Even though rpc uses 'unsigned int' for the _len parameter that
      passes the length of item<length>, the public libvirt APIs all
      use 'int' and filter out lengths < 0, except for virDomainSendKey.
      
      * include/libvirt/libvirt.h.in (virDomainSendKey): All other APIs
      use int for array length.
      * src/libvirt.c (virDomainSendKey): Adjust.
      * src/driver.h (virDrvDomainSendKey): Likewise.
      * daemon/remote_generator.pl: Likewise.
      1d575629
  15. 15 6月, 2011 7 次提交
  16. 13 6月, 2011 1 次提交
  17. 08 6月, 2011 1 次提交
    • E
      daemon: plug memory leak · f17eeede
      Eric Blake 提交于
      Detected by Coverity.  Commit ef21beda was incomplete; it solved
      a leak one one path, but not on the other.
      
      * daemon/libvirtd.c (qemudSetLogging): Avoid leak on success.
      f17eeede
  18. 03 6月, 2011 3 次提交
    • E
      remote: avoid leak on failure · c0e65ae5
      Eric Blake 提交于
      Detected by Coverity.  Only possible in OOM situations.
      
      * daemon/remote.c (remoteDispatchDomainScreenshot): Plug leak.
      c0e65ae5
    • E
      libvirtd: avoid leak on failure · ef21beda
      Eric Blake 提交于
      Spotted by Coverity.  Only possible on an OOM condition, so
      unlikely to bite in the wild.
      
      * daemon/libvirtd.c (qemudSetLogging): Don't leak memory.
      ef21beda
    • D
      Make sure virDomainSave/virDomainManagedSave reset id to -1 · 13488f55
      Daniel P. Berrange 提交于
      After successfull virDomainSave/virDomainManagedSave calls
      the guest will no longer be active, so the domain ID must
      be reset to -1
      
      * daemon/remote_generator.pl: Special case virDomainSave &
        virDomainManagedSave for same reason as virDomainDestroy
      13488f55