Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
geoclue
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
28
Issues
28
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
geoclue
geoclue
Commits
76d153d3
Commit
76d153d3
authored
Aug 01, 2007
by
Jussi Kukkonen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for case-sensitive plazes-API
plazes requires the MAC address to be in lowercase
parent
3a46de88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
backend/position_plazes/geoclue_position_server_plazes.c
backend/position_plazes/geoclue_position_server_plazes.c
+2
-2
No files found.
backend/position_plazes/geoclue_position_server_plazes.c
View file @
76d153d3
...
...
@@ -163,13 +163,13 @@ static gboolean get_mac_address (gchar** mac)
{
/* this is fairly ugly, but it seems there is no easy ioctl-based way to get
mac address of the router. This implementation expects the system to have
netstat, grep, awk and /proc/net/arp.
netstat, grep, awk
, tr
and /proc/net/arp.
*/
FILE
*
in
;
gint
mac_len
=
sizeof
(
gchar
)
*
18
;
if
(
!
(
in
=
popen
(
"AP_IP=`netstat -rn | grep '^0.0.0.0 ' | awk '{ print $2 }'` && grep
\"
^$AP_IP
\"
/proc/net/arp | awk '{print $4}'"
,
"r"
)))
{
if
(
!
(
in
=
popen
(
"AP_IP=`netstat -rn | grep '^0.0.0.0 ' | awk '{ print $2 }'` && grep
\"
^$AP_IP
\"
/proc/net/arp | awk '{print $4}'
| tr A-Z a-z
"
,
"r"
)))
{
g_debug
(
"mac address lookup failed"
);
return
FALSE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment