Commit b749aacbbb5ad45cda6be8605ad4a4f9105f9b32
1 parent
c3a6a256
Exists in
master
and in
5 other branches
Adding SSL trace option
Fixing trace window segfault.
Showing
5 changed files
with
40 additions
and
75 deletions
Show diff stats
pw3270.cbp
| ... | ... | @@ -56,11 +56,6 @@ |
| 56 | 56 | <Unit filename="android/Makefile" /> |
| 57 | 57 | <Unit filename="android/jni/Android.mk" /> |
| 58 | 58 | <Unit filename="android/jni/globals.h" /> |
| 59 | - <Unit filename="android/jni/main.cpp" /> | |
| 60 | - <Unit filename="android/jni/misc.cpp" /> | |
| 61 | - <Unit filename="android/jni/text.cpp" /> | |
| 62 | - <Unit filename="android/src/br/com/bb/pw3270/PW3270Activity.java" /> | |
| 63 | - <Unit filename="android/src/br/com/bb/pw3270/lib3270.java" /> | |
| 64 | 59 | <Unit filename="autogen.sh" /> |
| 65 | 60 | <Unit filename="configure.ac" /> |
| 66 | 61 | <Unit filename="man/man1/pw3270.1" /> |
| ... | ... | @@ -101,26 +96,6 @@ |
| 101 | 96 | <Option target="Debug" /> |
| 102 | 97 | <Option target="Release" /> |
| 103 | 98 | </Unit> |
| 104 | - <Unit filename="src/java/sample/bbsample.java"> | |
| 105 | - <Option target="Debug" /> | |
| 106 | - <Option target="Release" /> | |
| 107 | - </Unit> | |
| 108 | - <Unit filename="src/java/sample/efglobe.java"> | |
| 109 | - <Option target="Debug" /> | |
| 110 | - <Option target="Release" /> | |
| 111 | - </Unit> | |
| 112 | - <Unit filename="src/java/sample/popup.java"> | |
| 113 | - <Option target="Debug" /> | |
| 114 | - <Option target="Release" /> | |
| 115 | - </Unit> | |
| 116 | - <Unit filename="src/java/terminal.java"> | |
| 117 | - <Option target="Debug" /> | |
| 118 | - <Option target="Release" /> | |
| 119 | - </Unit> | |
| 120 | - <Unit filename="src/java/testprogram.java"> | |
| 121 | - <Option target="Debug" /> | |
| 122 | - <Option target="Release" /> | |
| 123 | - </Unit> | |
| 124 | 99 | <Unit filename="src/lib3270/3270ds.h" /> |
| 125 | 100 | <Unit filename="src/lib3270/Makefile.in" /> |
| 126 | 101 | <Unit filename="src/lib3270/ansic.h" /> |
| ... | ... | @@ -170,20 +145,13 @@ |
| 170 | 145 | <Unit filename="src/libpw3270cpp/session.cc" /> |
| 171 | 146 | <Unit filename="src/libpw3270cpp/testprogram.cc" /> |
| 172 | 147 | <Unit filename="src/loffice/Makefile.in" /> |
| 173 | - <Unit filename="src/loffice/connect.cc" /> | |
| 174 | 148 | <Unit filename="src/loffice/description.txt" /> |
| 175 | 149 | <Unit filename="src/loffice/description.xml" /> |
| 176 | 150 | <Unit filename="src/loffice/description.xml.in" /> |
| 177 | - <Unit filename="src/loffice/get.cc" /> | |
| 178 | 151 | <Unit filename="src/loffice/globals.hpp" /> |
| 179 | - <Unit filename="src/loffice/info.cc" /> | |
| 180 | - <Unit filename="src/loffice/init.cc" /> | |
| 181 | 152 | <Unit filename="src/loffice/manifest.xml" /> |
| 182 | 153 | <Unit filename="src/loffice/manifest.xml.in" /> |
| 183 | 154 | <Unit filename="src/loffice/pw3270.idl" /> |
| 184 | - <Unit filename="src/loffice/service.cc" /> | |
| 185 | - <Unit filename="src/loffice/set.cc" /> | |
| 186 | - <Unit filename="src/loffice/testprogram.cc" /> | |
| 187 | 155 | <Unit filename="src/oxt/Makefile.in" /> |
| 188 | 156 | <Unit filename="src/oxt/description.txt" /> |
| 189 | 157 | <Unit filename="src/oxt/description.xml.in" /> |
| ... | ... | @@ -191,14 +159,9 @@ |
| 191 | 159 | <Unit filename="src/oxt/manifest.xml.in" /> |
| 192 | 160 | <Unit filename="src/oxt/pw3270.idl" /> |
| 193 | 161 | <Unit filename="src/php/Makefile.in" /> |
| 194 | - <Unit filename="src/php/get.cc" /> | |
| 195 | - <Unit filename="src/php/init.cc" /> | |
| 196 | - <Unit filename="src/php/main.cc" /> | |
| 197 | - <Unit filename="src/php/misc.cc" /> | |
| 198 | 162 | <Unit filename="src/php/php.ini" /> |
| 199 | 163 | <Unit filename="src/php/php3270.h" /> |
| 200 | 164 | <Unit filename="src/php/sample.php" /> |
| 201 | - <Unit filename="src/php/set.cc" /> | |
| 202 | 165 | <Unit filename="src/plugins/dbus3270/Makefile.in" /> |
| 203 | 166 | <Unit filename="src/plugins/dbus3270/daemon.c"> |
| 204 | 167 | <Option compilerVar="CC" /> |
| ... | ... | @@ -342,41 +305,8 @@ |
| 342 | 305 | <Unit filename="src/pw3270/v3270/private.h" /> |
| 343 | 306 | <Unit filename="src/pw3270/v3270/sources.mak" /> |
| 344 | 307 | <Unit filename="src/pw3270/v3270ft/Makefile.in" /> |
| 345 | - <Unit filename="src/pw3270/v3270ft/filelist.c"> | |
| 346 | - <Option compilerVar="CC" /> | |
| 347 | - </Unit> | |
| 348 | 308 | <Unit filename="src/pw3270/v3270ft/genmarshal" /> |
| 349 | - <Unit filename="src/pw3270/v3270ft/get.c"> | |
| 350 | - <Option compilerVar="CC" /> | |
| 351 | - </Unit> | |
| 352 | - <Unit filename="src/pw3270/v3270ft/load.c"> | |
| 353 | - <Option compilerVar="CC" /> | |
| 354 | - </Unit> | |
| 355 | - <Unit filename="src/pw3270/v3270ft/misc.c"> | |
| 356 | - <Option compilerVar="CC" /> | |
| 357 | - </Unit> | |
| 358 | 309 | <Unit filename="src/pw3270/v3270ft/private.h" /> |
| 359 | - <Unit filename="src/pw3270/v3270ft/save.c"> | |
| 360 | - <Option compilerVar="CC" /> | |
| 361 | - </Unit> | |
| 362 | - <Unit filename="src/pw3270/v3270ft/select.c"> | |
| 363 | - <Option compilerVar="CC" /> | |
| 364 | - </Unit> | |
| 365 | - <Unit filename="src/pw3270/v3270ft/set.c"> | |
| 366 | - <Option compilerVar="CC" /> | |
| 367 | - </Unit> | |
| 368 | - <Unit filename="src/pw3270/v3270ft/tables.c"> | |
| 369 | - <Option compilerVar="CC" /> | |
| 370 | - </Unit> | |
| 371 | - <Unit filename="src/pw3270/v3270ft/transfer.c"> | |
| 372 | - <Option compilerVar="CC" /> | |
| 373 | - </Unit> | |
| 374 | - <Unit filename="src/pw3270/v3270ft/v3270ft.c"> | |
| 375 | - <Option compilerVar="CC" /> | |
| 376 | - </Unit> | |
| 377 | - <Unit filename="src/pw3270/v3270ft/v3270ftprogress.c"> | |
| 378 | - <Option compilerVar="CC" /> | |
| 379 | - </Unit> | |
| 380 | 310 | <Unit filename="src/pw3270/window.c"> |
| 381 | 311 | <Option compilerVar="CC" /> |
| 382 | 312 | </Unit> | ... | ... |
src/pw3270/actions.c
| ... | ... | @@ -363,6 +363,8 @@ static void lib3270_toggle_action(GtkToggleAction *action,GtkWidget *widget) |
| 363 | 363 | { |
| 364 | 364 | LIB3270_TOGGLE toggle = (LIB3270_TOGGLE) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action),"toggle_id")); |
| 365 | 365 | |
| 366 | + trace("Action %s toggled on widget %p (id=%d)\n",gtk_action_get_name(GTK_ACTION(action)),widget,(int) toggle); | |
| 367 | + | |
| 366 | 368 | lib3270_trace_event(v3270_get_session(widget),"Action %s toggled on widget %p (id=%d)\n",gtk_action_get_name(GTK_ACTION(action)),widget,(int) toggle); |
| 367 | 369 | |
| 368 | 370 | if(toggle == TOGGLE_GDKDEBUG) |
| ... | ... | @@ -438,6 +440,8 @@ static void action_set_toggle(GtkAction *action, GtkWidget *widget) |
| 438 | 440 | { |
| 439 | 441 | LIB3270_TOGGLE id = (LIB3270_TOGGLE) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action),"toggle_id")); |
| 440 | 442 | |
| 443 | + trace("Action %s activated on widget %p toggle=%d\n",gtk_action_get_name(action),widget,id); | |
| 444 | + | |
| 441 | 445 | lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p toggle=%d\n",gtk_action_get_name(action),widget,id); |
| 442 | 446 | lib3270_set_toggle(v3270_get_session(widget),id,1); |
| 443 | 447 | } |
| ... | ... | @@ -445,6 +449,9 @@ static void action_set_toggle(GtkAction *action, GtkWidget *widget) |
| 445 | 449 | static void action_reset_toggle(GtkAction *action, GtkWidget *widget) |
| 446 | 450 | { |
| 447 | 451 | LIB3270_TOGGLE id = (LIB3270_TOGGLE) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action),"toggle_id")); |
| 452 | + | |
| 453 | + trace("Action %s activated on widget %p toggle=%d\n",gtk_action_get_name(action),widget,id); | |
| 454 | + | |
| 448 | 455 | lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p toggle=%d\n",gtk_action_get_name(action),widget,id); |
| 449 | 456 | lib3270_set_toggle(v3270_get_session(widget),id,0); |
| 450 | 457 | } | ... | ... |
src/pw3270/tools.c
| ... | ... | @@ -136,6 +136,8 @@ LIB3270_EXPORT gboolean pw3270_set_toggle_by_name(GtkWidget *widget, const gchar |
| 136 | 136 | H3270 * hSession = pw3270_get_session(widget); |
| 137 | 137 | LIB3270_TOGGLE id = lib3270_get_toggle_id(name); |
| 138 | 138 | |
| 139 | + trace("%s(%s) id=%u",__FUNCTION__,name,id); | |
| 140 | + | |
| 139 | 141 | if(!hSession || id == (LIB3270_TOGGLE) -1) |
| 140 | 142 | return FALSE; |
| 141 | 143 | ... | ... |
src/pw3270/window.c
| ... | ... | @@ -257,13 +257,36 @@ |
| 257 | 257 | lib3270_set_toggle(hSession,LIB3270_TOGGLE_NETWORK_TRACE,0); |
| 258 | 258 | } |
| 259 | 259 | |
| 260 | + struct trace_data | |
| 261 | + { | |
| 262 | + H3270 * hSession; | |
| 263 | + gchar * text; | |
| 264 | + }; | |
| 260 | 265 | |
| 261 | - static void trace_window(G_GNUC_UNUSED H3270 *hSession, G_GNUC_UNUSED void * userdata, const char *fmt, va_list args) | |
| 266 | + static gboolean bg_trace_window(struct trace_data *data) | |
| 262 | 267 | { |
| 263 | - GtkWidget * widget = v3270_trace_new_from_session(hSession); | |
| 268 | + GtkWidget * widget = v3270_trace_new_from_session(data->hSession,data->text); | |
| 269 | + | |
| 264 | 270 | v3270_trace_set_destroy_on_close(widget,TRUE); |
| 265 | - g_signal_connect(widget, "destroy", G_CALLBACK(trace_window_destroy), hSession); | |
| 266 | - gtk_widget_show(widget); | |
| 271 | + | |
| 272 | + g_signal_connect(widget, "destroy", G_CALLBACK(trace_window_destroy), data->hSession); | |
| 273 | + | |
| 274 | + gtk_widget_show_all(widget); | |
| 275 | + | |
| 276 | + g_free(data->text); | |
| 277 | + | |
| 278 | + return FALSE; | |
| 279 | + } | |
| 280 | + | |
| 281 | + static void trace_window(G_GNUC_UNUSED H3270 *hSession, G_GNUC_UNUSED void * userdata, const char *fmt, va_list args) | |
| 282 | + { | |
| 283 | + struct trace_data * data = g_new0(struct trace_data,1); | |
| 284 | + | |
| 285 | + data->hSession = hSession; | |
| 286 | + data->text = g_strdup_vprintf(fmt,args); | |
| 287 | + | |
| 288 | + g_idle_add_full(G_PRIORITY_DEFAULT_IDLE,(GSourceFunc) bg_trace_window, data, g_free); | |
| 289 | + | |
| 267 | 290 | } |
| 268 | 291 | |
| 269 | 292 | GtkWidget * pw3270_new(const gchar *host, const gchar *systype, unsigned short colors) |
| ... | ... | @@ -292,7 +315,7 @@ |
| 292 | 315 | if(*ptr) |
| 293 | 316 | { |
| 294 | 317 | pw3270_set_url(widget,ptr); |
| 295 | - connct = pw3270_get_toggle(widget,LIB3270_TOGGLE_CONNECT_ON_STARTUP) ? TRUE : FALSE; | |
| 318 | +// connct = pw3270_get_toggle(widget,LIB3270_TOGGLE_CONNECT_ON_STARTUP) ? TRUE : FALSE; | |
| 296 | 319 | } |
| 297 | 320 | g_free(ptr); |
| 298 | 321 | } |
| ... | ... | @@ -318,8 +341,10 @@ |
| 318 | 341 | |
| 319 | 342 | v3270_set_scaled_fonts(GTK_PW3270(widget)->terminal,get_boolean_from_config("terminal","sfonts",FALSE)); |
| 320 | 343 | |
| 344 | + /* | |
| 321 | 345 | if(connct) |
| 322 | 346 | pw3270_connect(widget); |
| 347 | + */ | |
| 323 | 348 | |
| 324 | 349 | return widget; |
| 325 | 350 | } | ... | ... |
ui/98trace.xml
| ... | ... | @@ -37,6 +37,7 @@ |
| 37 | 37 | <menuitem action='toggle' id='screentrace' label='Trace screen contents' /> |
| 38 | 38 | <menuitem action='toggle' id='nettrace' label='Trace network data flow' /> |
| 39 | 39 | <menuitem action='toggle' id='eventtrace' label='Trace user interface events' /> |
| 40 | + <menuitem action='toggle' id='ssltrace' label='Trace SSL negotiation' /> | |
| 40 | 41 | </menu> |
| 41 | 42 | <menuitem action='toggle' id='fieldattr' label='Field Delimiters' /> |
| 42 | 43 | </menu> | ... | ... |