Changes in / [988:371f899276ed:987:8d7201a747eb] in freeDiameter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/dbg_interactive/dbg_interactive.c
r985 r974 36 36 #include <Python.h> 37 37 #include <freeDiameter/extension.h> 38 #include <unistd.h>39 38 40 39 /* wrapper generated by SWIG */ … … 62 61 CHECK_FCT_DO(fd_core_waitstartcomplete(), goto end); 63 62 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); 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); 77 68 } 69 Py_Main(arg ? 2 : 1, dum); 78 70 79 71 end: -
libfdproto/log.c
r986 r980 118 118 } 119 119 vfprintf(fstr, format, ap); 120 fprintf(fstr, "\n"); 120 121 if (local_use_color) 121 122 fprintf(fstr, "\e[00m"); 122 fprintf(fstr, "\n");123 123 124 124 fflush(fstr);
Note: See TracChangeset
for help on using the changeset viewer.