summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-06-01 23:55:11 (UTC)
committer harlekin <harlekin>2002-06-01 23:55:11 (UTC)
commit34b68507898f2a01333281a7293d0bbd3c6d77ee (patch) (unidiff)
tree3a620603d62d9c6bc52c00bf08c3f207c7814763
parent4f60b99a11c74a297c2471fd272735c9d8f9611f (diff)
downloadopie-34b68507898f2a01333281a7293d0bbd3c6d77ee.zip
opie-34b68507898f2a01333281a7293d0bbd3c6d77ee.tar.gz
opie-34b68507898f2a01333281a7293d0bbd3c6d77ee.tar.bz2
segfault fixed
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/applet/bluezapplet.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp
index b662ff7..39a9c6e 100644
--- a/noncore/net/opietooth/applet/bluezapplet.cpp
+++ b/noncore/net/opietooth/applet/bluezapplet.cpp
@@ -41,53 +41,57 @@
41#include <qframe.h> 41#include <qframe.h>
42#include <qpixmap.h> 42#include <qpixmap.h>
43#include <qstring.h> 43#include <qstring.h>
44#include <qtimer.h> 44#include <qtimer.h>
45#include <qpopupmenu.h> 45#include <qpopupmenu.h>
46 46
47#include <device.h> 47#include <device.h>
48 48
49namespace OpieTooth { 49namespace OpieTooth {
50 50
51 BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { 51 BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) {
52 setFixedHeight( 18 ); 52 setFixedHeight( 18 );
53 setFixedWidth( 14 ); 53 setFixedWidth( 14 );
54 bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" ); 54 bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" );
55 bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" ); 55 bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" );
56 // bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass" ); 56 // bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass" );
57 startTimer(5000); 57 startTimer(5000);
58 timerEvent(NULL); 58 timerEvent(NULL);
59 } 59 }
60 60
61 BluezApplet::~BluezApplet() { 61 BluezApplet::~BluezApplet() {
62 } 62 }
63 63
64 int BluezApplet::checkBluezStatus() { 64 int BluezApplet::checkBluezStatus() {
65 if (btDevice->isLoaded() ) { 65 if (btDevice) {
66 return 1; 66 if (btDevice->isLoaded() ) {
67 return 1;
67 } else { 68 } else {
68 return 0; 69 return 0;
69 } 70 }
71 } else {
72 return 0;
73 }
70 } 74 }
71 75
72 int BluezApplet::setBluezStatus(int c) { 76 int BluezApplet::setBluezStatus(int c) {
73 77
74 if (c == 1) { 78 if (c == 1) {
75 btDevice = new Device("/dev/ttySB0", "scr" ); 79 btDevice = new Device("/dev/ttySB0", "scr" );
76 // system("hciattach /dev/ttySB0 csr"); 80 // system("hciattach /dev/ttySB0 csr");
77 //system("hcid"); 81 //system("hcid");
78 } else { 82 } else {
79 if (btDevice) { 83 if (btDevice) {
80 delete btDevice; 84 delete btDevice;
81 } 85 }
82 //system("killall hciattach"); 86 //system("killall hciattach");
83 //system("killall hcid"); 87 //system("killall hcid");
84 } 88 }
85 return 0; 89 return 0;
86 } 90 }
87 91
88 int BluezApplet::checkBluezDiscoveryStatus() { 92 int BluezApplet::checkBluezDiscoveryStatus() {
89 } 93 }
90 94
91 int BluezApplet::setBluezDiscoveryStatus(int d) { 95 int BluezApplet::setBluezDiscoveryStatus(int d) {
92 } 96 }
93 97