Lines Matching refs:hp
382 dsvc_handle_t hp;
392 if ((hp = calloc(1, sizeof (struct dsvc_handle))) == NULL)
396 hp->d_conid.c_net.s_addr = ntohl(inet_addr(name));
397 if (hp->d_conid.c_net.s_addr == INADDR_BROADCAST) {
398 free(hp);
401 get_netmask4(&hp->d_conid.c_net, &hp->d_conid.c_mask);
404 error = load_public_module(ddp, &hp->d_instance, &hp->d_api);
406 free(hp);
410 hp->d_type = type;
411 hp->d_desc.d_conver = ddp->d_conver;
412 hp->d_desc.d_resource = strdup(ddp->d_resource);
413 hp->d_desc.d_location = strdup(ddp->d_location);
414 if (hp->d_desc.d_resource == NULL || hp->d_desc.d_location == NULL) {
422 error = synch_init(hp, name, flags);
427 error = hp->d_api.open_dt(&hp->d_hand, ddp->d_location, flags);
429 error = hp->d_api.open_dn(&hp->d_hand, ddp->d_location, flags,
430 &hp->d_conid.c_net, &hp->d_conid.c_mask);
433 if (hp->d_synch != NULL)
434 synch_fini(hp);
438 *handp = hp;
441 (void) unload_public_module(&hp->d_instance, &hp->d_api);
442 free(hp->d_desc.d_resource);
443 free(hp->d_desc.d_location);
444 free(hp);