[Freeswitch-svn] [commit] r8866 - freeswitch/trunk/src/mod/languages/mod_yaml

Freeswitch SVN anthm at freeswitch.org
Mon Jun 30 17:55:39 EDT 2008


Author: anthm
Date: Mon Jun 30 17:55:38 2008
New Revision: 8866

Modified:
   freeswitch/trunk/src/mod/languages/mod_yaml/Makefile
   freeswitch/trunk/src/mod/languages/mod_yaml/mod_yaml.c

Log:
fix build for 64

Modified: freeswitch/trunk/src/mod/languages/mod_yaml/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_yaml/Makefile	(original)
+++ freeswitch/trunk/src/mod/languages/mod_yaml/Makefile	Mon Jun 30 17:55:38 2008
@@ -10,7 +10,7 @@
 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:

Modified: freeswitch/trunk/src/mod/languages/mod_yaml/mod_yaml.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_yaml/mod_yaml.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_yaml/mod_yaml.c	Mon Jun 30 17:55:38 2008
@@ -46,11 +46,11 @@
         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 @@
             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 @@
             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 @@
 							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 @@
 							} 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 @@
 		yaml_event_delete(&event);
 	}
 
+ end:
+
 	switch_safe_free(last_field);
 	switch_regex_safe_free(re);
 	yaml_parser_delete(&parser);



More information about the Freeswitch-svn mailing list