Changeset 2648
- Timestamp:
- 08/15/07 17:05:43
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/libtinymail-maemo/tny-maemo-conic-device.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r2647 r2648 1 2007-08-15 Philip Van Hoof <pvanhoof@gnome.org> 2 3 * Reading dnsmasq's resolv.conf files to know whether or not we are 4 initially online or not in libtinymail-maemo/tny-maemo-conic-device.c 5 1 6 2007-08-15 Murray Cumming <murrayc@murrayc.com> 2 7 trunk/libtinymail-maemo/tny-maemo-conic-device.c
r2647 r2648 35 35 #ifdef MAEMO_CONIC_DUMMY 36 36 37 38 static gboolean 39 dnsmasq_has_resolv (void) 40 { 41 /* This is because silly Conic does not have a blocking API that tells 42 * us immediately when the device is online. */ 43 44 if (!g_file_test ("/var/run/resolv.conf", G_FILE_TEST_EXISTS)) 45 if (!g_file_test ("/tmp/resolv.conf.wlan0", G_FILE_TEST_EXISTS)) 46 if (!g_file_test ("/tmp/resolv.conf.ppp0", G_FILE_TEST_EXISTS)) 47 return FALSE; 48 49 return TRUE; 50 } 51 37 52 /* #include "coniciap-private.h" 38 53 * This is not installed, so we predeclare the struct instead. Of course, this … … 123 138 /* Emit it in an idle handler: */ 124 139 EmitStatusInfo *info = g_slice_new (EmitStatusInfo); 140 guint time = 1; 141 125 142 info->self = g_object_ref (self); 126 143 info->status = status; 127 g_timeout_add_full (G_PRIORITY_DEFAULT, 5000, conic_emit_status_idle, 144 145 if (!dnsmasq_has_resolv()) 146 time = 5000; 147 148 g_timeout_add_full (G_PRIORITY_DEFAULT, time, conic_emit_status_idle, 128 149 info, conic_emit_status_destroy); 129 150 … … 268 289 { 269 290 int response = 0; 270 291 271 292 /* Show a dialog, because libconic would show a dialog here, 272 293 * and give the user a chance to refuse a new connection, because libconic would allow that too. … … 703 724 priv->forced = FALSE; 704 725 priv->iap = NULL; 705 /* priv->is_online = FALSE; */ 706 707 /* TODO: This is a hack that fixes a problem: Our signal is not emitted 708 * before the gtk mainloop is started, because we use an idle handler 709 * for that and we don't know how to detect when the mainloop has not 710 * yet started. The downside is that we now don't know that we are really 711 * offline, so we can't ask the user to go online. This must be fixed 712 * properly. */ 713 714 priv->is_online = TRUE; 726 priv->is_online = dnsmasq_has_resolv (); 715 727 716 728
