int main()
{
int i,rc;
- fwp_vres_d_t vres_d1, vres_d2;
- fwp_contract_d_t cnt1d, cnt2d;
+ fwp_vres_d_t vres_d1, vres_d2, vres_d3;
+ fwp_contract_d_t cnt1d, cnt2d, cnt3d;
fwp_contract_t cnt1;
fwp_contract_t cnt2;
printf("Contract2 negotiated.\n");
}else
printf("Contract2 not negotiated.\n");
-#if 0
- rc = fwp_contract_negotiate(&cnt1, &vres_d);
- if (rc == FWP_CONTNEGT_ACCEPTED) {
- printf("Contract 1 negotiated\n");
- } else
- printf("Contract 1 rejected.\n");
- rc = fwp_contract_negotiate(&cnt2, &vres_d);
- if (rc == FWP_CONTNEGT_ACCEPTED) {
- printf("Contract 2 negotiated\n");
- } else
- printf("Contract 2 rejected.\n");
-
- rc = fwp_contract_negotiate(&cnt3, &vres_d);
- if (rc == FWP_CONTNEGT_ACCEPTED) {
- printf("Contract 3 negotiated\n");
- } else
- printf("Contract 3 rejected.\n");
+ cnt3d = fwp_contract_create(&cnt3);
+ fwp_contract_negotiate(cnt3d, &vres_d3);
+ if (fwp_contract_is_negotiated(cnt3d)) {
+ printf("Contract3 negotiated.\n");
+ }else
+ printf("Contract3 not negotiated.\n");
-// printf("Contract negotiated\n");
printf("Test PASSED!\n");
// scanf("Press key%d",&vres_id1);
-#endif
return 0;
}