Browse Source

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 năm trước cách đây
mục cha
commit
d8cd450f97
2 tập tin đã thay đổi với 3 bổ sung1 xóa
  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 */