Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
domainepublic
alternc
Commits
cde8eb71
Commit
cde8eb71
authored
Mar 28, 2014
by
Alan Garcia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mini modif
parent
9a50431a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
bureau/class/db_mysql.php
bureau/class/db_mysql.php
+2
-4
upnp/m_upnp.php
upnp/m_upnp.php
+15
-13
No files found.
bureau/class/db_mysql.php
View file @
cde8eb71
...
...
@@ -328,7 +328,7 @@ class DB_Sql {
$this
->
Seq_Table
,
$seq_name
,
$currentid
);
$id
=
@
mysql_query
(
$q
,
$this
->
Link_ID
);
@
mysql_query
(
$q
,
$this
->
Link_ID
);
}
else
{
$currentid
=
$res
[
"nextid"
];
}
...
...
@@ -337,7 +337,7 @@ class DB_Sql {
$this
->
Seq_Table
,
$nextid
,
$seq_name
);
$id
=
@
mysql_query
(
$q
,
$this
->
Link_ID
);
@
mysql_query
(
$q
,
$this
->
Link_ID
);
$this
->
unlock
();
}
else
{
$this
->
halt
(
"cannot lock "
.
$this
->
Seq_Table
.
" - has it been created?"
);
...
...
@@ -348,8 +348,6 @@ class DB_Sql {
/* public: return table metadata */
function
metadata
(
$table
=
''
,
$full
=
false
)
{
$count
=
0
;
$id
=
0
;
$res
=
array
();
/*
...
...
upnp/m_upnp.php
View file @
cde8eb71
...
...
@@ -168,19 +168,21 @@ class m_upnp {
$status
=
array
();
$statusout
=
array
();
$bad
=
false
;
unset
(
$out
);
exec
(
"upnpc -l 2>&1"
,
$res
,
$out
);
foreach
(
$out
as
$line
)
{
// example line: 1 TCP 222->192.168.0.5:22 'libminiupnpc' ''
if
(
preg_match
(
"#^ *([0-9]+) (TCP|UDP) *([0-9]+)\-\>([0-9\.]+):([0-9]+) *#"
,
$line
,
$mat
))
{
if
(
$mat
[
4
]
==
$L_INTERNAL_IP
)
{
$status
[]
=
array
(
"protocol"
=>
$mat
[
2
],
"port"
=>
$mat
[
3
]);
}
else
{
$statusout
[]
=
array
(
"protocol"
=>
$mat
[
2
],
"port"
=>
$mat
[
3
],
"ip"
=>
$mat
[
4
]);
}
}
if
(
preg_match
(
"#No IGD UPnP Device found on the network#"
,
$line
))
{
$bad
=
true
;
}
}
// For each line in upnpc -l (check list)
if
(
is_array
(
$out
)
&&
!
empty
(
$out
))
{
foreach
(
$out
as
$line
)
{
// example line: 1 TCP 222->192.168.0.5:22 'libminiupnpc' ''
if
(
preg_match
(
"#^ *([0-9]+) (TCP|UDP) *([0-9]+)\-\>([0-9\.]+):([0-9]+) *#"
,
$line
,
$mat
))
{
if
(
$mat
[
4
]
==
$L_INTERNAL_IP
)
{
$status
[]
=
array
(
"protocol"
=>
$mat
[
2
],
"port"
=>
$mat
[
3
]);
}
else
{
$statusout
[]
=
array
(
"protocol"
=>
$mat
[
2
],
"port"
=>
$mat
[
3
],
"ip"
=>
$mat
[
4
]);
}
}
if
(
preg_match
(
"#No IGD UPnP Device found on the network#"
,
$line
))
{
$bad
=
true
;
}
}
// For each line in upnpc -l (check list)
}
// No UPnP peripheral !! maybe you should not have installed AlternC-upnp altogether ?
if
(
$bad
)
{
...
...
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