소스 검색

Kamailio compatiblity: export parse_method function to modules.

The parser function was originally static and we are now exporting
it to other object files so that they can reuse the method parser.
Jan Janak 16 년 전
부모
커밋
d8cd450f97
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      parser/parse_methods.c
  2. 2 0
      parser/parse_methods.h

+ 1 - 1
parser/parse_methods.c

@@ -49,7 +49,7 @@ static int token_char(char _c)
   * Parse a method pointed by _next, assign its enum bit to _method, and update
   * _next past the method. Returns 1 if parse succeeded and 0 otherwise.
   */
-static int parse_method(str* _next, unsigned int* _method) 
+int parse_method(str* _next, unsigned int* _method) 
  {
 	 if (!_next || !_method) {
 		 LOG(L_ERR, "parse_method: Invalid parameter value\n");

+ 2 - 0
parser/parse_methods.h

@@ -57,5 +57,7 @@ enum method {
  */
 int parse_methods(str* _body, unsigned int* _methods);
 
+int parse_method(str* _next, unsigned int* _method);
+
 
 #endif /* PARSE_METHODS_H */