Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/nsswitch/libwbclient/wbc_guid.c

    r414 r745  
    3030                       char **guid_string)
    3131{
    32         wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
     32        char *result;
    3333
    34         if (!guid) {
    35                 wbc_status = WBC_ERR_INVALID_PARAM;
    36                 BAIL_ON_WBC_ERROR(wbc_status);
     34        result = (char *)wbcAllocateMemory(37, 1, NULL);
     35        if (result == NULL) {
     36                return WBC_ERR_NO_MEMORY;
    3737        }
     38        snprintf(result, 37,
     39                 "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
     40                 guid->time_low, guid->time_mid,
     41                 guid->time_hi_and_version,
     42                 guid->clock_seq[0],
     43                 guid->clock_seq[1],
     44                 guid->node[0], guid->node[1],
     45                 guid->node[2], guid->node[3],
     46                 guid->node[4], guid->node[5]);
     47        *guid_string = result;
    3848
    39         *guid_string = talloc_asprintf(NULL,
    40                                        "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
    41                                        guid->time_low, guid->time_mid,
    42                                        guid->time_hi_and_version,
    43                                        guid->clock_seq[0],
    44                                        guid->clock_seq[1],
    45                                        guid->node[0], guid->node[1],
    46                                        guid->node[2], guid->node[3],
    47                                        guid->node[4], guid->node[5]);
    48         BAIL_ON_PTR_ERROR((*guid_string), wbc_status);
    49 
    50         wbc_status = WBC_ERR_SUCCESS;
    51 
    52 done:
    53         return wbc_status;
     49        return WBC_ERR_SUCCESS;
    5450}
    5551
Note: See TracChangeset for help on using the changeset viewer.