~n-muench/ubuntu/precise/open-vm-tools/open-vm-tools-precise.sid-merge1

« back to all changes in this revision

Viewing changes to tests/vmrpcdbg/vmrpcdbg.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-12-06 07:45:05 UTC
  • mfrom: (1.1.8 upstream) (2.4.10 sid)
  • Revision ID: james.westby@ubuntu.com-20091206074505-43rp7oejjgp0y2re
Tags: 2009.11.16-210370-1
* Merging upstream version 2009.11.16-210370.
* Moving vmusr plugins from open-vm-tools to open-vm-toolbox (Closes:
  #539282, #557215).
* Correcting plugin location (Closes: #545222, #549044).
* Dropping la files (Closes: #551626).
* Adding open-vm-toolbox lintian overrides.
* Removing test plugin.
* Removing unused plugin symlinks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#include <gmodule.h>
28
28
#include <rpc/rpc.h>
29
 
#include "vmrpcdbg.h"
 
29
#include "util.h"
 
30
#include "vmware/tools/rpcdebug.h"
30
31
 
31
32
#if !defined(__APPLE__)
32
33
#include "embed_version.h"
140
141
 
141
142
 
142
143
/**
 
144
 * Sets @a res / @a len when responding to an RPC.
 
145
 *
 
146
 * @param[in]  str   The string to set.
 
147
 * @param[out] res   Where to store the result.
 
148
 * @param[out] len   Where to store the length.
 
149
 */
 
150
 
 
151
void
 
152
RpcDebug_SetResult(const char *str,
 
153
                   char **res,
 
154
                   size_t *len)
 
155
{
 
156
   if (res != NULL) {
 
157
      *res = Util_SafeStrdup(str);
 
158
   }
 
159
   if (len != NULL) {
 
160
      *len = strlen(str);
 
161
   }
 
162
}
 
163
 
 
164
 
 
165
/**
143
166
 * Shuts down the debug library. Unloads the debug plugin. The plugin's data
144
167
 * shouldn't be used after this function is called.
145
168
 *