]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix build for 64
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 30 Jun 2008 21:55:38 +0000 (21:55 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 30 Jun 2008 21:55:38 +0000 (21:55 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8866 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/languages/mod_yaml/Makefile
src/mod/languages/mod_yaml/mod_yaml.c

index db1df40ba6fce14d8977898fabb67ee8d579c3b0..1150826b5536032aa77bfd30ca398d16c1a530b5 100644 (file)
@@ -10,7 +10,7 @@ include $(BASE)/build/modmake.rules
 local_depend: $(LIBYAML_A)
 
 $(LIBYAML_A):
-       cd $(YAMLLIB) && ./configure $(DEFAULT_ARGS) --disable-shared
+       cd $(YAMLLIB) && ./configure $(DEFAULT_ARGS) --disable-shared --with-pic
        cd $(YAMLLIB) && $(MAKE)
 
 yamlclean:
index e5ec2250478b76c50c341671b0c680587d3f1c76..ce40fd83c8ae338e1ab9345b8015d910640c4f14 100644 (file)
@@ -46,11 +46,11 @@ static void print_error(yaml_parser_t *parser)
         case YAML_READER_ERROR:
             if (parser->problem_value != -1) {
                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Reader error: %s: #%X at %d\n", parser->problem,
-                                                                 parser->problem_value, parser->problem_offset);
+                                                                 parser->problem_value, (int) parser->problem_offset);
             }
             else {
                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Reader error: %s at %d\n", parser->problem,
-                                                                 parser->problem_offset);
+                                                                 (int) parser->problem_offset);
             }
             break;
 
@@ -58,14 +58,14 @@ static void print_error(yaml_parser_t *parser)
             if (parser->context) {
                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Scanner error: %s at line %d, column %d\n"
                                                                  "%s at line %d, column %d\n", parser->context,
-                                                                 parser->context_mark.line+1, parser->context_mark.column+1,
-                                                                 parser->problem, parser->problem_mark.line+1,
-                                                                 parser->problem_mark.column+1);
+                                                                 (int)parser->context_mark.line+1, (int)parser->context_mark.column+1,
+                                                                 parser->problem, (int)parser->problem_mark.line+1,
+                                                                 (int)parser->problem_mark.column+1);
             }
             else {
                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Scanner error: %s at line %d, column %d\n",
-                                                                 parser->problem, parser->problem_mark.line+1,
-                                                                 parser->problem_mark.column+1);
+                                                                 parser->problem, (int)parser->problem_mark.line+1,
+                                                                 (int)parser->problem_mark.column+1);
             }
             break;
 
@@ -73,14 +73,14 @@ static void print_error(yaml_parser_t *parser)
             if (parser->context) {
                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parser error: %s at line %d, column %d\n"
                                                                  "%s at line %d, column %d\n", parser->context,
-                                                                 parser->context_mark.line+1, parser->context_mark.column+1,
-                                                                 parser->problem, parser->problem_mark.line+1,
-                                                                 parser->problem_mark.column+1);
+                                                                 (int)parser->context_mark.line+1, (int)parser->context_mark.column+1,
+                                                                 parser->problem, (int)parser->problem_mark.line+1,
+                                                                 (int)parser->problem_mark.column+1);
             }
             else {
                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parser error: %s at line %d, column %d\n",
-                                                                 parser->problem, parser->problem_mark.line+1,
-                                                                 parser->problem_mark.column+1);
+                                                                 parser->problem, (int)parser->problem_mark.line+1,
+                                                                 (int)parser->problem_mark.column+1);
             }
             break;
 
@@ -339,6 +339,11 @@ static switch_caller_extension_t *parse_dp(FILE *input, switch_core_session_t *s
                                                        uint32_t len = 0;
                                                        char *substituted = NULL;
                                                        char *app_data;
+
+                                                       if (!strcasecmp(name, "exit")) {
+                                                               yaml_event_delete(&event);
+                                                               goto end;
+                                                       }
                                                        
                                                        if (!extension) {
                                                                extension = switch_caller_extension_new(session, "YAML", caller_profile->destination_number);
@@ -353,9 +358,8 @@ static switch_caller_extension_t *parse_dp(FILE *input, switch_core_session_t *s
                                                        } else {
                                                                app_data = value;
                                                        }
-
+                                                       
                                                        switch_caller_extension_add_application(session, extension, name, app_data);
-                                                       printf("TEST [%s][%s][%s]\n", category, name, app_data);
                                                        switch_safe_free(substituted);
                                                }
                                        }
@@ -371,6 +375,8 @@ static switch_caller_extension_t *parse_dp(FILE *input, switch_core_session_t *s
                yaml_event_delete(&event);
        }
 
+ end:
+
        switch_safe_free(last_field);
        switch_regex_safe_free(re);
        yaml_parser_delete(&parser);