~tritone-team/tritone/eucalyptus

« back to all changes in this revision

Viewing changes to node/client-marshal-adb.c

  • Committer: Bazaar Package Importer
  • Author(s): Dustin Kirkland
  • Date: 2009-12-01 21:09:28 UTC
  • mto: This revision was merged to the branch mainline in revision 75.
  • Revision ID: james.westby@ubuntu.com-20091201210928-o2dvg0ubljhb0ft6
Tags: upstream-1.6.1~bzr1083
ImportĀ upstreamĀ versionĀ 1.6.1~bzr1083

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
    } else {
87
87
        client_home = AXIS2_GETENV("AXIS2C_HOME");
88
88
    }
 
89
    if (client_home == NULL) {
 
90
        logprintfl (EUCAERROR, "ERROR: cannot get AXIS2C_HOME");
 
91
        return NULL;
 
92
    }
 
93
    if (endpoint_uri == NULL) {
 
94
        logprintfl (EUCAERROR, "ERROR: empty endpoint_url");
 
95
        return NULL;
 
96
    }
89
97
    
90
98
    /* TODO: what if endpoint_uri, home, or env are NULL? */
91
99
    stub = axis2_stub_create_EucalyptusNC(env, client_home, (axis2_char_t *)endpoint_uri);
95
103
        st->client_home=strdup((char *)client_home);
96
104
        st->endpoint_uri=(axis2_char_t *)strdup(endpoint_uri);
97
105
        st->stub=stub;
 
106
        if (st->client_home == NULL || st->endpoint_uri == NULL) {
 
107
            logprintfl (EUCAWARN, "WARNING: out of memory");
 
108
        }
 
109
    } else {
 
110
        logprintfl (EUCAWARN, "WARNING: out of memory");
98
111
    } 
99
112
    
100
113
    return st;
138
151
 
139
152
static ncInstance * copy_instance_from_adb (adb_instanceType_t * instance, axutil_env_t * env)
140
153
{
141
 
    adb_virtualMachineType_t * vm_type = adb_instanceType_get_instanceType(instance, env);
 
154
    adb_virtualMachineType_t * vm_type;
142
155
    ncInstParams params;
143
156
    bzero(&params, sizeof(ncInstParams));
144
157
    vm_type = adb_instanceType_get_instanceType(instance, env);
426
439
            
427
440
            * outInstsLen = adb_ncDescribeInstancesResponseType_sizeof_instances(response, env);
428
441
            if (* outInstsLen) {
429
 
              * outInsts = malloc (sizeof(ncInstance *) * *outInstsLen);
 
442
                * outInsts = malloc (sizeof(ncInstance *) * *outInstsLen);
430
443
                if ( * outInsts == NULL ) { 
431
444
                    logprintfl (EUCAERROR, "ERROR: out of memory in ncDescribeInstancesStub()\n");
432
445
                    * outInstsLen = 0;