Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

34 linhas
818B

  1. #include "http-reason.h"
  2. const char* rtsp_reason_phrase(int code)
  3. {
  4. static const char *reason45x[] =
  5. {
  6. "Parameter Not Understood", // 451
  7. "Conference Not Found", // 452
  8. "Not Enough Bandwidth", // 453
  9. "Session Not Found", // 454
  10. "Method Not Valid in This State", // 455
  11. "Header Field Not Valid for Resource", // 456
  12. "Invalid Range", // 457
  13. "Parameter Is Read-Only", // 458
  14. "Aggregate Operation Not Allowed", // 459
  15. "Only Aggregate Operation Allowed", // 460
  16. "Unsupported Transport", // 461
  17. "Destination Unreachable", // 462
  18. };
  19. if(451 <= code && code < 451+sizeof(reason45x)/sizeof(reason45x[0]))
  20. return reason45x[code-451];
  21. switch(code)
  22. {
  23. case 505:
  24. return "RTSP Version Not Supported";
  25. case 551:
  26. return "Option not supported";
  27. default:
  28. return http_reason_phrase(code);
  29. }
  30. }