1. 04 7月, 2011 1 次提交
    • E
      rpc: fix logic bug · 2aa83b43
      Eric Blake 提交于
      Spotted by Coverity.  If we don't update tmp each time through
      the loop, then if the filter being removed was not the head of
      the list, we accidentally lose all filters prior to the one we
      wanted to remove.
      
      * src/rpc/virnetserverclient.c (virNetServerClientRemoveFilter):
          Don't lose unrelated filters.
      2aa83b43
  2. 01 7月, 2011 2 次提交
    • D
      Ensure RPC message is cleared before being reused · d840fe93
      Daniel P. Berrange 提交于
      To save on memory reallocation, virNetMessage instances that
      have been transmitted, may be reused for a subsequent incoming
      message. We forgot to clear out the old data of the message
      fully, which caused later confusion upon read.
      
      * src/rpc/virnetserverclient.c: memset entire message before
        reusing it
      d840fe93
    • 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
  3. 29 6月, 2011 1 次提交
  4. 24 6月, 2011 1 次提交
    • D
      Introduce generic RPC server objects · 4e00b1da
      Daniel P. Berrange 提交于
      To facilitate creation of new daemons providing XDR RPC services,
      pull a lot of the libvirtd daemon code into a set of reusable
      objects.
      
       * virNetServer: A server contains one or more services which
         accept incoming clients. It maintains the list of active
         clients. It has a list of RPC programs which can be used
         by clients. When clients produce a complete RPC message,
         the server passes this onto the corresponding program for
         handling, and queues any response back with the client.
      
       * virNetServerClient: Encapsulates a single client connection.
         All I/O for the client is handled, reading & writing RPC
         messages.
      
       * virNetServerProgram: Handles processing and dispatch of
         RPC method calls for a single RPC (program,version).
         Multiple programs can be registered with the server.
      
       * virNetServerService: Encapsulates socket(s) listening for
         new connections. Each service listens on a single host/port,
         but may have multiple sockets if on a dual IPv4/6 host.
      
      Each new daemon now merely has to define the list of RPC procedures
      & their handlers. It does not need to deal with any network related
      functionality at all.
      4e00b1da