NetworkStatus now joins networks by address instead of name.
* This solves part of ticket #10008.
This commit is contained in:
parent
1bc85a38d5
commit
6c7caf44df
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2012, Haiku, Inc. All rights reserved.
|
||||
* Copyright 2006-2013, Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@ -288,10 +288,12 @@ NetworkStatusView::MessageReceived(BMessage* message)
|
||||
{
|
||||
const char* deviceName;
|
||||
const char* name;
|
||||
BNetworkAddress address;
|
||||
if (message->FindString("device", &deviceName) == B_OK
|
||||
&& message->FindString("name", &name) == B_OK) {
|
||||
&& message->FindString("name", &name) == B_OK
|
||||
&& message->FindFlat("address", &address) == B_OK) {
|
||||
BNetworkDevice device(deviceName);
|
||||
status_t status = device.JoinNetwork(name);
|
||||
status_t status = device.JoinNetwork(address);
|
||||
if (status != B_OK) {
|
||||
BString text
|
||||
= B_TRANSLATE("Could not join wireless network:\n");
|
||||
@ -467,6 +469,7 @@ NetworkStatusView::MouseDown(BPoint point)
|
||||
BMessage* message = new BMessage(kMsgJoinNetwork);
|
||||
message->AddString("device", wifiInterface);
|
||||
message->AddString("name", network.name);
|
||||
message->AddFlat("address", &network.address);
|
||||
|
||||
BMenuItem* item = new WirelessNetworkMenuItem(network.name,
|
||||
network.signal_strength,
|
||||
|
Loading…
Reference in New Issue
Block a user