Changeset 9:fc7c18867cf7 in freeDiameter
- Timestamp:
- Sep 24, 2009, 2:01:48 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r8 r9 23 23 # All source code should be POSIX 200112L compatible, but some other extensions might be used, so: 24 24 ADD_DEFINITIONS(-D_GNU_SOURCE) 25 IF (CMAKE_BUILD_TYPE MATCHES "Debug") 26 SET(DEBUG 1) 27 ENDIF (CMAKE_BUILD_TYPE MATCHES "Debug") 25 28 26 29 # some subfolders use yacc and lex parsers -
doc/freediameter.conf.sample
r8 r9 129 129 TwTimer = 6; 130 130 NoRelay; 131 LoadExtension = "extensions/sample.so";132 LoadExtension = "extensions/sample. so":"conf/sample.conf";131 #LoadExtension = "extensions/sample.fdx"; 132 LoadExtension = "extensions/sample.fdx":"conf/sample.conf"; -
extensions/CMakeLists.txt
r8 r9 3 3 # We want all resulting objects in the same folder 4 4 SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) 5 # And named fdext_XXX instead of libXXX.so6 5 7 #-- faire une macro ici! 8 SET(FD_EXT_PREFIX "fdext_" PARENT_SCOPE) 9 SET(FD_EXT_SUFFIX "" PARENT_SCOPE) 6 # Use the macro FD_ADD_EXTENSION(name files...) to create an extension 7 # It is equivalent to add_library with the appropriate parameters 8 # and naming conventions (.fdx : FreeDiameter eXtension) 9 MACRO(FD_ADD_EXTENSION EXTNAME) 10 ADD_LIBRARY(${EXTNAME} MODULE ${ARGN}) 11 SET_TARGET_PROPERTIES(${EXTNAME} PROPERTIES PREFIX "" ) 12 SET_TARGET_PROPERTIES(${EXTNAME} PROPERTIES SUFFIX ".fdx" ) 13 ENDMACRO(FD_ADD_EXTENSION) 10 14 11 15 ########################### -
extensions/_sample/CMakeLists.txt
r8 r9 3 3 4 4 # Compile as a module 5 ADD_LIBRARY(sample MODULE sample.c fini.c) 6 7 # Comply to naming scheme 8 SET_TARGET_PROPERTIES(sample PROPERTIES PREFIX "${FD_EXT_PREFIX}" ) 9 SET_TARGET_PROPERTIES(sample PROPERTIES SUFFIX "${FD_EXT_SUFFIX}" ) 5 FD_ADD_EXTENSION(sample sample.c fini.c) -
extensions/_sample/fini.c
r8 r9 40 40 void fd_ext_fini(void) 41 41 { 42 log_debug("Extension is terminated... Bye!\n");42 fd_log_debug("Extension is terminated... Bye!\n"); 43 43 return ; 44 44 } -
extensions/_sample/sample.c
r8 r9 56 56 57 57 /* Use the dictionary for test */ 58 log_debug("Let's create that 'Example-AVP'...\n");58 fd_log_debug("Let's create that 'Example-AVP'...\n"); 59 59 { 60 60 struct dict_object * origin_host_avp = NULL; … … 79 79 CHECK_FCT( fd_dict_new ( fd_g_config->g_dict, DICT_RULE, &rule_data, example_avp_avp, NULL )); 80 80 } 81 log_debug("'Example-AVP' created without error\n");81 fd_log_debug("'Example-AVP' created without error\n"); 82 82 83 83 return 0; -
freeDiameter/extensions.c
r8 r9 97 97 98 98 /* Load the extension */ 99 #ifndef DEBUG 99 100 ext->handler = dlopen(ext->filename, RTLD_LAZY | RTLD_GLOBAL); 101 #else /* DEBUG */ 102 /* We resolve immediatly so it's easier to find problems in ABI */ 103 ext->handler = dlopen(ext->filename, RTLD_NOW | RTLD_GLOBAL); 104 #endif /* DEBUG */ 100 105 if (ext->handler == NULL) { 101 106 /* An error occured */ -
freeDiameter/main.c
r8 r9 247 247 248 248 /* cleanups */ 249 CHECK_FCT( fd_thr_term(&sig_th) ); 249 CHECK_FCT_DO( fd_ext_fini(), /* continue */ ); 250 CHECK_FCT_DO( fd_thr_term(&sig_th), /* continue */ ); 250 251 251 252 return ret; -
include/freeDiameter/freeDiameter-host.h.in
r8 r9 46 46 #cmakedefine DISABLE_SCTP 47 47 48 #cmakedefine DEBUG 49 48 50 #cmakedefine FD_PROJECT_BINARY "@FD_PROJECT_BINARY@" 49 51 #cmakedefine FD_PROJECT_NAME "@FD_PROJECT_NAME@"
Note: See TracChangeset
for help on using the changeset viewer.