Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.3 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) Microsoft Corporation
  4. //
  5. // SYNOPSIS
  6. //
  7. // Defines the class BaseCampHostBase.
  8. //
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #include "Precompiled.h"
  11. #include "ias.h"
  12. #include "basecamp.h"
  13. #include "ControlBlock.h"
  14. STDMETHODIMP BaseCampHostBase::Initialize()
  15. {
  16. DWORD error = extensions.Load(point);
  17. return HRESULT_FROM_WIN32(error);
  18. }
  19. STDMETHODIMP BaseCampHostBase::Shutdown()
  20. {
  21. extensions.Clear();
  22. return S_OK;
  23. }
  24. IASREQUESTSTATUS BaseCampHostBase::onSyncRequest(IRequest* pRequest) throw ()
  25. {
  26. // Early return if there aren't any extensions,
  27. if (extensions.IsEmpty())
  28. {
  29. return IAS_REQUEST_STATUS_CONTINUE;
  30. }
  31. try
  32. {
  33. IASRequest request(pRequest);
  34. // Convert VSAs to RADIUS format.
  35. filter.radiusFromIAS(request);
  36. // Invoke the extensions.
  37. extensions.Process(ControlBlock(point, request).Get());
  38. // Convert VSAs back to internal format.
  39. filter.radiusToIAS(request);
  40. }
  41. catch (const _com_error& ce)
  42. {
  43. IASTraceExcept();
  44. pRequest->SetResponse(IAS_RESPONSE_DISCARD_PACKET, IAS_INTERNAL_ERROR);
  45. }
  46. return IAS_REQUEST_STATUS_CONTINUE;
  47. }