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
8c3039dc
Kaydet (Commit)
8c3039dc
authored
Haz 25, 2009
tarafından
Bahadır Kandemir
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Support for listing running method calls
üst
bfaf6580
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
Core.xml
comar/models/Core.xml
+4
-0
loop.c
comar/src/loop.c
+13
-1
No files found.
comar/models/Core.xml
Dosyayı görüntüle @
8c3039dc
...
...
@@ -25,6 +25,10 @@
<arg
name=
"method_name"
type=
"s"
direction=
"in"
/>
<arg
name=
"killed_calls"
type=
"i"
direction=
"out"
/>
</method>
<method
name=
"listRunning"
action_id=
""
>
<arg
name=
"all"
type=
"b"
direction=
"in"
/>
<arg
name=
"methods"
type=
"as"
direction=
"out"
/>
</method>
<method
name=
"setLocale"
action_id=
""
>
<arg
name=
"locale"
type=
"s"
direction=
"in"
/>
</method>
...
...
comar/src/loop.c
Dosyayı görüntüle @
8c3039dc
...
...
@@ -172,6 +172,18 @@ handle_core_message(DBusMessage *bus_msg, const char *path, const char *iface, c
// log_debug("Killed %d processes.\n", total);
bus_reply_object
(
bus_msg
,
PyInt_FromLong
((
long
)
total
),
"i"
);
}
else
if
(
strcmp
(
method
,
"listRunning"
)
==
0
)
{
int
i
;
PyObject
*
py_list
=
PyList_New
(
0
);
// Iterate over all child processes
for
(
i
=
0
;
i
<
my_proc
.
nr_children
;
i
++
)
{
struct
ProcChild
*
child
=
&
my_proc
.
children
[
i
];
if
(
PyTuple_GetItem
(
py_args
,
0
)
==
Py_True
||
dbus_message_has_sender
(
child
->
bus_msg
,
sender
))
{
PyList_Append
(
py_list
,
PyString_FromFormat
(
"%s.%s"
,
dbus_message_get_interface
(
child
->
bus_msg
),
dbus_message_get_member
(
child
->
bus_msg
)));
}
}
bus_reply_object
(
bus_msg
,
py_list
,
"as"
);
}
}
static
DBusHandlerResult
...
...
@@ -194,7 +206,7 @@ filter_func(DBusConnection *conn, DBusMessage *bus_msg, void *data)
log_debug
(
"Got message '%s.%s' from '%s'
\n
"
,
iface
,
method
,
sender
);
if
(
strcmp
(
config_interface
,
iface
)
==
0
&&
strcmp
(
path
,
"/"
)
==
0
)
{
// "setLocale" and "cancel" methods are handled in main process
if
(
strcmp
(
method
,
"setLocale"
)
==
0
||
strcmp
(
method
,
"cancel"
)
==
0
)
{
if
(
strcmp
(
method
,
"setLocale"
)
==
0
||
strcmp
(
method
,
"cancel"
)
==
0
||
strcmp
(
method
,
"listRunning"
)
==
0
)
{
handle_core_message
(
bus_msg
,
path
,
iface
,
method
,
sender
,
py_args
);
}
else
{
...
...
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