static json_object *_muse_msg_json_tokener_parse_len(const char *str, int *len, muse_core_msg_parse_err_e *err);
static gboolean _muse_msg_is_mem_ptr_valid(gpointer ptr);
static void _muse_msg_json_factory_args(json_object *jobj, va_list ap);
-static json_object *_muse_msg_json_find_obj(json_object * jobj, const char *find_key);
+static json_object *_muse_msg_json_find_obj(json_object *jobj, const char *find_key);
static int _muse_get_valid_fd_count(int *fds)
{
}
}
-static json_object *_muse_msg_json_find_obj(json_object * jobj, const char *find_key)
+static json_object *_muse_msg_json_find_obj(json_object *jobj, const char *find_key)
{
size_t key_len = 0;
Name: mused
Summary: A multimedia daemon
-Version: 0.3.30
+Version: 0.3.31
Release: 0
Group: System/Libraries
License: Apache-2.0
typedef gboolean (*muse_module_dispatchfunc) (muse_module_h m);
typedef gboolean (*muse_module_cmd_dispatchfunc) (muse_module_h m);
-typedef gboolean (*muse_module_callback) (GIOChannel * source, GIOCondition condition, gpointer data);
+typedef gboolean (*muse_module_callback) (GIOChannel *source, GIOCondition condition, gpointer data);
typedef struct ms_module {
int idx;
#define MUSE_WORK_THREAD_NUM 1
typedef struct ms_workqueue_job {
- gboolean(*job_function) (struct ms_workqueue_job * job);
+ gboolean(*job_function) (struct ms_workqueue_job *job);
void *user_data;
struct ms_workqueue_job *prev;
struct ms_workqueue_job *next;
return MUSE_EVENT_UNKNOWN;
}
- for (idx = 0 ; idx < fd_count ; idx++) {
+ for (idx = 0; idx < fd_count; idx++) {
p_event = &connection->events[idx];
- if (p_event->events == EPOLLIN || p_event->events == EPOLLOUT)
+ if (p_event->events == EPOLLIN || p_event->events == EPOLLOUT) {
+ if (*value != MUSE_CONNECTION_STATE_CONNECTED)
+ event_value = MUSE_EVENT_CONNECTION_STATE_CHANGED;
*value = MUSE_CONNECTION_STATE_CONNECTED;
- else
+ } else {
+ if (*value != MUSE_CONNECTION_STATE_DISCONNECTED)
+ event_value = MUSE_EVENT_CONNECTION_STATE_CHANGED;
*value = MUSE_CONNECTION_STATE_DISCONNECTED;
- event_value = MUSE_EVENT_CONNECTION_STATE_CHANGED;
+ }
}
return event_value;