Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
S
scom
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
scom
Commits
dc3359af
Kaydet (Commit)
dc3359af
authored
May 20, 2018
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Şu an sorunsuz çalışıyor
üst
526edf17
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
Core.xml
scom/models/Core.xml
+2
-2
loop.c
scom/src/loop.c
+5
-2
pydbus.c
scom/src/pydbus.c
+1
-1
script.c
scom/src/script.c
+1
-0
No files found.
scom/models/Core.xml
Dosyayı görüntüle @
dc3359af
...
...
@@ -10,11 +10,11 @@
<arg
name=
"package"
type=
"s"
direction=
"in"
/>
<annotation
name=
"org.freedesktop.DBus.Method.NoReply"
value=
"true"
/>
</method>
<method
name=
"listModelApplications"
action_id=
"
tr.org.sulin.scom.listModelApplications
"
>
<method
name=
"listModelApplications"
action_id=
""
>
<arg
name=
"model"
type=
"s"
direction=
"in"
/>
<arg
name=
"apps"
type=
"as"
direction=
"out"
/>
</method>
<method
name=
"listApplicationModels"
action_id=
"
tr.org.sulin.scom.listApplicationModels
"
>
<method
name=
"listApplicationModels"
action_id=
""
>
<arg
name=
"app"
type=
"s"
direction=
"in"
/>
<arg
name=
"models"
type=
"as"
direction=
"out"
/>
</method>
...
...
scom/src/loop.c
Dosyayı görüntüle @
dc3359af
...
...
@@ -78,19 +78,21 @@ message_execute(DBusMessage *msg, const char *app, const char *model, const char
if
(
strcmp
(
action_id
,
""
)
!=
0
)
{
int
result
;
if
(
policy_check
(
sender
,
action_id
,
&
result
)
==
0
)
{
if
(
policy_check
(
sender
,
action_id
,
&
result
)
==
0
)
{
if
(
result
!=
POLICY_YES
)
{
bus_reply_error
(
msg
,
"Scom.PolicyKit"
,
action_id
);
return
;
}
}
else
{
else
{
bus_reply_error
(
msg
,
"Scom.PolicyKit"
,
"error"
);
return
;
}
}
}
// Execute method
switch
(
py_execute
(
app
,
model
,
method
,
py_args
,
&
py_ret
))
{
case
0
:
...
...
@@ -127,6 +129,7 @@ handle_message(DBusMessage *msg)
if
(
method
==
NULL
||
path
==
NULL
||
iface
==
NULL
)
{
bus_reply_unknown_method
(
msg
);
}
else
if
(
strcmp
(
"org.freedesktop.DBus.Introspectable"
,
iface
)
==
0
&&
strcmp
(
"Introspect"
,
method
)
==
0
)
{
// Introspection method
message_execute
(
msg
,
NULL
,
"Core"
,
"introspect"
);
...
...
scom/src/pydbus.c
Dosyayı görüntüle @
dc3359af
...
...
@@ -293,7 +293,7 @@ pydbus_export_item(DBusMessageIter *iter, PyObject *obj, char *signature)
p
.
s
=
PyBytes_AsString
(
obj
);
}
//If returned Unicode type return utf-8 coded string
if
(
PyUnicode_Check
(
obj
))
{
else
if
(
PyUnicode_Check
(
obj
))
{
p
.
s
=
PyUnicode_AsUTF8
(
obj
);
}
else
{
...
...
scom/src/script.c
Dosyayı görüntüle @
dc3359af
...
...
@@ -529,6 +529,7 @@ py_execute(const char *app, const char *model, const char *method, PyObject *py_
PyObject
*
py_dict_core
;
PyObject
*
py_mod_core
;
// Add core module directory to sys.path
py_module
=
PyImport_ImportModule
(
"sys"
);
py_dict
=
PyModule_GetDict
(
py_module
);
...
...
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