return 0;
}
+static int
+reject_transactions(struct fcb_contract *fcb_contracts[], int num)
+{
+ int i;
+ for (i = 0; i < num; i++) {
+ if (fcb_contracts[i]->transaction)
+ return FRES_ERR_VRES_PART_OF_TRANSACTION;
+ }
+ return 0;
+}
CORBA_long
negotiate_contracts(fres_contract_broker obj,
contracts->_buffer, num);
if (ret)
goto err_free_fcb_contracts;
+
+ ret = reject_transactions(fcb_contracts, num);
+ if (ret)
+ goto err_free_fcb_contracts;
ret = check_and_setup_resource(fcb, fcb_contracts, &resource,
&app, num);
if (ret)
WVFRSH(frsh_transaction_alloc_vres(&t, TEST_CONTRACT_1, &vres1));
WVPASS(frsh_transaction_alloc_vres(&t, TEST_CONTRACT_2+1, &vres1) == FRSH_ERR_TOO_LARGE);
/* TEST_CONTRACT_2 is allocated in trans_nego2.c */
-#if 0
- WVPASS(frsh_contract_cancel(vres2) == FRES_ERR_VRES_PART_OF_TRANSACTION);
-#endif
+
+ WVPASS(frsh_contract_cancel(vres1) == FRES_ERR_VRES_PART_OF_TRANSACTION);
+
frsh_destroy();
}