Changeset 985:74a5e2b8ae19 in freeDiameter
- Timestamp:
- Mar 17, 2013, 9:45:00 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/dbg_interactive/dbg_interactive.c
r974 r985 36 36 #include <Python.h> 37 37 #include <freeDiameter/extension.h> 38 #include <unistd.h> 38 39 39 40 /* wrapper generated by SWIG */ … … 61 62 CHECK_FCT_DO(fd_core_waitstartcomplete(), goto end); 62 63 63 fd_log_debug("Starting interactive python interpreter [experimental]."); 64 if (!arg) { 65 fd_log_debug("Example syntax:"); 66 fd_log_debug(" >>> print cvar.fd_g_config.cnf_diamid"); 67 fd_log_debug(" '%s'", fd_g_config->cnf_diamid); 64 if (arg) { 65 fd_log_debug("Starting python interpreter with a script file [experimental]."); 66 Py_Main(2, dum); 67 } else { 68 if (!isatty(fileno(stdin)) || !isatty(fileno(stdout))) { 69 TRACE_ERROR("[dbg_interactive]: this extension requires freeDiameter to be run from a console terminal!"); 70 goto end; 71 } 72 printf("Starting interactive python interpreter [experimental].\n"); 73 printf("Example syntax:\n"); 74 printf(" >>> print cvar.fd_g_config.cnf_diamid\n"); 75 printf(" '%s'\n", fd_g_config->cnf_diamid); 76 Py_Main(1, dum); 68 77 } 69 Py_Main(arg ? 2 : 1, dum);70 78 71 79 end:
Note: See TracChangeset
for help on using the changeset viewer.