590
590
 
 *
591
591
 
 * Return:  SUCCEED/FAIL
592
592
 
 *
593
593
 
 * Programmer:  Quincey Koziol
594
594
 
 *      koziol@hdfgroup.org
595
595
 
 *      Nov  7 2006
596
596
 
 *
597
597
 
 *-------------------------------------------------------------------------
598
598
 
 */
599
599
 
static herr_t
600
 
-
H5G_dense_lookup_by_idx_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata)
 
600
+
H5G_dense_lookup_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
601
601
 
{
602
602
 
    H5G_fh_ud_lbi_t *udata = (H5G_fh_ud_lbi_t *)_udata;       /* User data for fractal heap 'op' callback */
603
603
 
    H5O_link_t *tmp_lnk = NULL;         /* Temporary pointer to link */
604
604
 
    herr_t ret_value = SUCCEED;         /* Return value */
605
605
 
606
606
 
    FUNC_ENTER_NOAPI_NOINIT
607
607
 
608
608
 
    /* Decode link information & keep a copy */
609
 
-
    if(NULL == (tmp_lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj)))
 
609
+
    if(NULL == (tmp_lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
610
610
 
        HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link")
611
611
 
612
612
 
    /* Copy link information */
613
613
 
    if(NULL == H5O_msg_copy(H5O_LINK_ID, tmp_lnk, udata->lnk))
614
614
 
        HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message")
615
615
 
616
616
 
done:
617
617
 
    /* Release the space allocated for the link */
618
618
 
    if(tmp_lnk)
619
619
 
        H5O_msg_free(H5O_LINK_ID, tmp_lnk);
Show more
880
880
 
 *
881
881
 
 * Return:  SUCCEED/FAIL
882
882
 
 *
883
883
 
 * Programmer:  Quincey Koziol
884
884
 
 *      koziol@hdfgroup.org
885
885
 
 *      Sep 11 2006
886
886
 
 *
887
887
 
 *-------------------------------------------------------------------------
888
888
 
 */
889
889
 
static herr_t
890
 
-
H5G_dense_iterate_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata)
 
890
+
H5G_dense_iterate_fh_cb(const void *obj, size_t obj_len, void *_udata)
891
891
 
{
892
892
 
    H5G_fh_ud_it_t *udata = (H5G_fh_ud_it_t *)_udata;       /* User data for fractal heap 'op' callback */
893
893
 
    herr_t ret_value = SUCCEED;   /* Return value */
894
894
 
895
895
 
    FUNC_ENTER_NOAPI_NOINIT
896
896
 
897
897
 
    /* Decode link information & keep a copy */
898
898
 
    /* (we make a copy instead of calling the user/library callback directly in
899
899
 
     *  this routine because this fractal heap 'op' callback routine is called
900
900
 
     *  with the direct block protected and if the callback routine invokes an
901
901
 
     *  HDF5 routine, it could attempt to re-protect that direct block for the
902
902
 
     *  heap, causing the HDF5 routine called to fail - QAK)
903
903
 
     */
904
 
-
    if(NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj)))
 
904
+
    if(NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
905
905
 
        HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link")
906
906
 
907
907
 
done:
908
908
 
    FUNC_LEAVE_NOAPI(ret_value)
909
909
 
} /* end H5G_dense_iterate_fh_cb() */
910
910
 
911
911
 
912
912
 
/*-------------------------------------------------------------------------
913
913
 
 * Function:    H5G_dense_iterate_bt2_cb
914
914
 
 *
Show more
1092
1092
 
 *
1093
1093
 
 * Return:  SUCCEED/FAIL
1094
1094
 
 *
1095
1095
 
 * Programmer:  Quincey Koziol
1096
1096
 
 *      koziol@hdfgroup.org
1097
1097
 
 *      Sep 19 2006
1098
1098
 
 *
1099
1099
 
 *-------------------------------------------------------------------------
1100
1100
 
 */
1101
1101
 
static herr_t
1102
 
-
H5G_dense_get_name_by_idx_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata)
 
1102
+
H5G_dense_get_name_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
1103
1103
 
{
1104
1104
 
    H5G_fh_ud_gnbi_t *udata = (H5G_fh_ud_gnbi_t *)_udata;       /* User data for fractal heap 'op' callback */
1105
1105
 
    H5O_link_t *lnk;            /* Pointer to link created from heap object */
1106
1106
 
    herr_t ret_value = SUCCEED; /* Return value */
1107
1107
 
1108
1108
 
    FUNC_ENTER_NOAPI_NOINIT
1109
1109
 
1110
1110
 
    /* Decode link information */
1111
 
-
    if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj)))
 
1111
+
    if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
1112
1112
 
        HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link")
1113
1113
 
1114
1114
 
    /* Get the length of the name */
1115
1115
 
    udata->name_len = (ssize_t)HDstrlen(lnk->name);
1116
1116
 
1117
1117
 
    /* Copy the name into the user's buffer, if given */
1118
1118
 
    if(udata->name) {
1119
1119
 
        HDstrncpy(udata->name, lnk->name, MIN((size_t)(udata->name_len + 1), udata->name_size));
1120
1120
 
        if((size_t)udata->name_len >= udata->name_size)
1121
1121
 
            udata->name[udata->name_size - 1] = '\0';
Show more
1299
1299
 
 *
1300
1300
 
 * Return:  SUCCEED/FAIL
1301
1301
 
 *
1302
1302
 
 * Programmer:  Quincey Koziol
1303
1303
 
 *      koziol@hdfgroup.org
1304
1304
 
 *      Sep 12 2006
1305
1305
 
 *
1306
1306
 
 *-------------------------------------------------------------------------
1307
1307
 
 */
1308
1308
 
static herr_t
1309
 
-
H5G_dense_remove_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata)
 
1309
+
H5G_dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata)
1310
1310
 
{
1311
1311
 
    H5G_fh_ud_rm_t *udata = (H5G_fh_ud_rm_t *)_udata;       /* User data for fractal heap 'op' callback */
1312
1312
 
    H5O_link_t *lnk = NULL;             /* Pointer to link created from heap object */
1313
1313
 
    H5B2_t *bt2 = NULL;                 /* v2 B-tree handle for index */
1314
1314
 
    herr_t ret_value = SUCCEED;         /* Return value */
1315
1315
 
1316
1316
 
    FUNC_ENTER_NOAPI_NOINIT
1317
1317
 
1318
1318
 
    /* Decode link information */
1319
 
-
    if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj)))
 
1319
+
    if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
1320
1320
 
        HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link")
1321
1321
 
1322
1322
 
    /* Check for removing the link from the creation order index */
1323
1323
 
    if(H5F_addr_defined(udata->corder_bt2_addr)) {
1324
1324
 
        H5G_bt2_ud_common_t bt2_udata;         /* Info for B-tree callbacks */
1325
1325
 
1326
1326
 
        /* Open the creation order index v2 B-tree */
1327
1327
 
        if(NULL == (bt2 = H5B2_open(udata->f, udata->dxpl_id, udata->corder_bt2_addr, NULL)))
1328
1328
 
            HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
1329
1329
 
Show more
1476
1476
 
 *
1477
1477
 
 * Return:  SUCCEED/FAIL
1478
1478
 
 *
1479
1479
 
 * Programmer:  Quincey Koziol
1480
1480
 
 *      koziol@hdfgroup.org
1481
1481
 
 *      Nov 15 2006
1482
1482
 
 *
1483
1483
 
 *-------------------------------------------------------------------------
1484
1484
 
 */
1485
1485
 
static herr_t
1486
 
-
H5G_dense_remove_by_idx_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata)
 
1486
+
H5G_dense_remove_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
1487
1487
 
{
1488
1488
 
    H5G_fh_ud_rmbi_t *udata = (H5G_fh_ud_rmbi_t *)_udata;       /* User data for fractal heap 'op' callback */
1489
1489
 
    herr_t ret_value = SUCCEED; /* Return value */
1490
1490
 
1491
1491
 
    FUNC_ENTER_NOAPI_NOINIT
1492
1492
 
1493
1493
 
    /* Decode link information */
1494
 
-
    if(NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj)))
 
1494
+
    if(NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
1495
1495
 
        HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, H5_ITER_ERROR, "can't decode link")
1496
1496
 
1497
1497
 
    /* Can't operate on link here because the fractal heap block is locked */
1498
1498
 
1499
1499
 
done:
1500
1500
 
    FUNC_LEAVE_NOAPI(ret_value)
1501
1501
 
} /* end H5G_dense_remove_by_idx_fh_cb() */
1502
1502
 
1503
1503
 
1504
1504
 
/*-------------------------------------------------------------------------