diff extensions/_sample/sample.c @ 653:34373acfbc6a

Added sample C++ file in _sample extension
author Sebastien Decugis <sdecugis@nict.go.jp>
date Tue, 11 Jan 2011 12:18:09 +0900
parents c5c99c73c2bf
children 2e94ef0515d7
line wrap: on
line diff
--- a/extensions/_sample/sample.c	Tue Jan 11 12:17:50 2011 +0900
+++ b/extensions/_sample/sample.c	Tue Jan 11 12:18:09 2011 +0900
@@ -36,6 +36,9 @@
 /* Sample extension to test extensions mechanism in freeDiameter */
 #include <freeDiameter/extension.h>
 
+/* from sample.cpp */
+void mycppfunc();
+
 static int sample_main(char * conffile);
 
 /* Define the entry point. A convenience macro is provided */
@@ -85,6 +88,9 @@
 	}
 	TRACE_DEBUG(INFO, "'Example-AVP' created without error\n");
 	
+	/* Call the c++ function */
+	mycppfunc();
+	
 	/* The initialization function returns an error code with the standard POSIX meaning (ENOMEM, and so on) */
 	return 0;
 }
"Welcome to our mercurial repository"